Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: add actionlint job #1

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion .github/workflows/reusable-yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
inputs:
strict:
description: 'Whether to enable strict mode.'
description: 'Whether to enable strict mode for yamllint.'
type: boolean
required: false
default: false
Expand All @@ -31,3 +31,23 @@ jobs:
- name: Pipe Yamllint results on to GH for inline display
if: ${{ failure() && github.event_name == 'pull_request' }}
run: yamllint . --format github ${{ inputs.strict && '--strict' || '' }}

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
uses: docker://rhysd/actionlint:latest
with:
args: -color