From cee5a5e5e33aab8e39b525cceb6dbbb4920ea064 Mon Sep 17 00:00:00 2001 From: Matt Moore Date: Mon, 25 Mar 2024 19:42:50 -0700 Subject: [PATCH 1/2] Add actionslint presubmit Signed-off-by: Matt Moore --- .github/workflows/actionlint.yaml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/actionlint.yaml diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml new file mode 100644 index 0000000..24f6056 --- /dev/null +++ b/.github/workflows/actionlint.yaml @@ -0,0 +1,34 @@ +# Copyright 2022 Chainguard, Inc. +# SPDX-License-Identifier: Apache-2.0 + +name: Action Lint + +on: + pull_request: + branches: [ 'main', 'release-*' ] + +jobs: + + action-lint: + name: Action lint + runs-on: ubuntu-latest + + steps: + - name: Harden Runner + uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 + with: + egress-policy: audit + + - name: Check out code + uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 + + - name: Find yamls + id: get_yamls + run: | + yamls="$(find .github/workflows -name "*.y*ml" | grep -v dependabot. | xargs echo)" + echo "files=${yamls}" >> "$GITHUB_OUTPUT" + + - name: Action lint + uses: reviewdog/action-actionlint@c6ee1eb0a5d47b2af53a203652b5dac0b6c4016e # v1.43.0 + with: + actionlint_flags: ${{ steps.get_yamls.outputs.files }} From c355887fb8c40d4d4cefcb0a35968f866a151554 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Tue, 26 Mar 2024 13:24:25 +0100 Subject: [PATCH 2/2] Update .github/workflows/actionlint.yaml Signed-off-by: Carlos Tadeu Panato Junior --- .github/workflows/actionlint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml index 24f6056..1836a19 100644 --- a/.github/workflows/actionlint.yaml +++ b/.github/workflows/actionlint.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 Chainguard, Inc. +# Copyright 2024 Chainguard, Inc. # SPDX-License-Identifier: Apache-2.0 name: Action Lint