From ca1d4beb2a81c46e958d64e5555ad81c6eab4724 Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani <45800463+rchincha@users.noreply.github.com> Date: Fri, 13 Jan 2023 00:49:42 -0800 Subject: [PATCH] ci: also allow manual workflow triggers (#1109) * ci: also allow manual workflow triggers Signed-off-by: Ramkumar Chinchani * ci: add a github actions checker Signed-off-by: Ramkumar Chinchani --- .github/workflows/sync-3rdparty-images.yaml | 1 + Makefile | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-3rdparty-images.yaml b/.github/workflows/sync-3rdparty-images.yaml index 30f39d3a..3010f010 100644 --- a/.github/workflows/sync-3rdparty-images.yaml +++ b/.github/workflows/sync-3rdparty-images.yaml @@ -5,6 +5,7 @@ on: push: branches: - main + workflow_dispatch: permissions: contents: read diff --git a/Makefile b/Makefile index b448a58d..fbf63aa4 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,8 @@ ORAS := $(TOOLSDIR)/bin/oras ORAS_VERSION := 0.16.0 REGCLIENT := $(TOOLSDIR)/bin/regctl REGCLIENT_VERSION := v0.4.5 +ACTION_VALIDATOR := $(TOOLSDIR)/bin/action-validator +ACTION_VALIDATOR_VERSION := v0.2.1 STACKER := $(TOOLSDIR)/bin/stacker BATS := $(TOOLSDIR)/bin/bats TESTDATA := $(TOP_LEVEL)/test/data @@ -30,7 +32,7 @@ hyphen:= - extended-name:= .PHONY: all -all: modcheck swagger binary binary-minimal binary-debug cli bench exporter-minimal verify-config test covhtml check +all: modcheck swagger binary binary-minimal binary-debug cli bench exporter-minimal verify-config test covhtml check check-gh-actions .PHONY: modcheck modcheck: @@ -127,6 +129,16 @@ $(REGCLIENT): cp regctl $(TOOLSDIR)/bin/regctl chmod +x $(TOOLSDIR)/bin/regctl +$(ACTION_VALIDATOR): + mkdir -p $(TOOLSDIR)/bin + curl -Lo action-validator https://github.com/mpalmer/action-validator/releases/download/$(ACTION_VALIDATOR_VERSION)/action-validator_linux_amd64 + cp action-validator $(TOOLSDIR)/bin/action-validator + chmod +x $(TOOLSDIR)/bin/action-validator + +.PHONY: check-gh-actions +check-gh-actions: $(ACTION_VALIDATOR) + for i in $$(ls .github/workflows/*); do $(ACTION_VALIDATOR) $$i; done + .PHONY: covhtml covhtml: go install github.com/wadey/gocovmerge@latest