From b805914eb4250e4e18df343b44f0608a06e0b7f4 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 14 May 2024 21:37:00 -0700 Subject: [PATCH] Add a workflow to validate workflows. Concept from https://github.com/mpalmer/action-validator?tab=readme-ov-file#in-a-github-action --- .github/workflows/validate.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/validate.yaml diff --git a/.github/workflows/validate.yaml b/.github/workflows/validate.yaml new file mode 100644 index 0000000..bddac3b --- /dev/null +++ b/.github/workflows/validate.yaml @@ -0,0 +1,29 @@ +name: Actions Workflows + +on: + push: + paths: + - ".github/workflows/*" + pull_request: + paths: + - ".github/workflows/*" + +jobs: + actions: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install action-validator with asdf + uses: asdf-vm/actions/install@v3 + with: + tool_versions: | + action-validator 0.5.1 + + - name: Lint Actions + run: | + find .github/workflows -type f \( -iname \*.yaml -o -iname \*.yml \) \ + | xargs -I {} action-validator --verbose {} \ No newline at end of file