Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH Actions: add actionlint job
Browse files Browse the repository at this point in the history
While GH Actions will fail runs of scripts which contain syntax errors, it isn't always that straight forward to see what's wrong.

The `actionlint` package helps with that by providing more informative error messages. Actionlint also checks for a number of best practice to help keep the GH Actions scripts secure and working.

Ref: https://github.com/rhysd/actionlint
jrfnl committed Jan 21, 2025

Verified

This commit was signed with the committer’s verified signature.
jrfnl Juliette
1 parent 7fd3c0d commit 2097663
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/cs.yml
Original file line number Diff line number Diff line change
@@ -14,6 +14,28 @@ concurrency:
cancel-in-progress: true

jobs:
actionlint: #----------------------------------------------------------------------
name: 'Check GHA workflows'
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Add problem matcher
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
curl -o actionlint-matcher.json https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json
echo "::add-matcher::actionlint-matcher.json"
- name: Check workflow files
env:
SHELLCHECK_OPTS: --exclude=SC2129
uses: docker://rhysd/actionlint:latest
with:
args: -color

phpcs: #----------------------------------------------------------------------
name: 'PHPCS'
runs-on: ubuntu-latest

0 comments on commit 2097663

Please sign in to comment.