diff --git a/.github/workflows/actionlint.yaml b/.github/workflows/actionlint.yaml index b6f2f467f87..6b656748233 100644 --- a/.github/workflows/actionlint.yaml +++ b/.github/workflows/actionlint.yaml @@ -3,14 +3,36 @@ on: workflow_call: jobs: - actionlint: + Lint_GitHub_Actions: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4.1.1 - - name: Download actionlint - id: get_actionlint - run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.25/scripts/download-actionlint.bash) - shell: bash - - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color - shell: bash + # - uses: actions/checkout@v4.1.1 + # - name: Download actionlint + # id: get_actionlint + # run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/v1.6.25/scripts/download-actionlint.bash) + # shell: bash + # - name: Check workflow files + # run: ${{ steps.get_actionlint.outputs.executable }} -color + # shell: bash + - name: actionlint + id: actionlint #optional, id required only when outputs are used in the workflow steps later + uses: raven-actions/actionlint@v1.0.3 + with: + version: 1.6.27 + # matcher: false # optional + # cache: false # optional + # fail-on-error: false # optional + # files: "tests/*.yml, tests/*.yaml" # optional, example on how to grab all .yml and .yaml files from the test directory + # flags: "-ignore SC2086" # optional + + - name: actionlint_summary + if: ${{ steps.actionlint.outputs.exit-code != 0 }} # example usage, do echo only when actionlint action failed + run: | + echo "Used actionlint version ${{ steps.actionlint.outputs.version-semver }}" + echo "Used actionlint release ${{ steps.actionlint.outputs.version-tag }}" + echo "actionlint ended with ${{ steps.actionlint.outputs.exit-code }} exit code" + echo "actionlint ended because '${{ steps.actionlint.outputs.exit-message }}'" + echo "actionlint found ${{ steps.actionlint.outputs.total-errors }} errors" + echo "actionlint checked ${{ steps.actionlint.outputs.total-files }} files" + echo "actionlint cache used: ${{ steps.actionlint.outputs.cache-hit }}" + exit ${{ steps.actionlint.outputs.exit-code }}