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

Add GitHub Actions workflow for linting YAML files #11493

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 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
25 changes: 25 additions & 0 deletions .github/workflows/lint-workflow-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint GitHub Workflow YAML Files

on:
pull_request:
paths:
- '.github/workflows/*.yml'
- '.github/workflows/*.yaml'

jobs:
lint:
runs-on: ubuntu-latest

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

- name: Lint GitHub Workflow YAML Files with Docker
run: |
docker run --rm -v "${{ github.workspace }}:/repo" --workdir /repo rhysd/actionlint:latest -color .github/workflows/*.yml .github/workflows/*.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use a specific version rather than latest to prevent the build from suddenly breaking with an unexpected change in a new release?

(ideally, the version should also be auto-upgraded with a renovate PR)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right using a specific version will ensure stability. I will update that. thanks

Copy link
Author

@KenEkanem KenEkanem Oct 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes made here 420b4a8 and 115372d


- name: Reminder to Address Linting Errors
if: failure()
run: |
echo "⚠️ Please address all linting errors before merging this pull request."

Loading