Skip to content

Commit

Permalink
workflows: add actionlint workflow
Browse files Browse the repository at this point in the history
This will help us avoid actionlint errors in the future.
  • Loading branch information
carlocab committed Apr 14, 2023
1 parent 60a902b commit 44cc56d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels: []
# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
config-variables: []
40 changes: 40 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: actionlint

on:
push:
branches:
- master
paths:
- '.github/workflows/*.ya?ml'
pull_request:
paths:
- '.github/workflows/*.ya?ml'
merge_group:

concurrency:
group: "actionlint-${{ github.ref }}"
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_ENV_HINTS: 1

jobs:
workflow_syntax:
if: github.repository_owner == 'Homebrew'
runs-on: ubuntu-latest
steps:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
test-bot: false

- uses: actions/checkout@v3

- name: Set up actionlint
run: |
brew install actionlint shellcheck
echo "::add-matcher::$(brew --repository)/.github/actionlint-matcher.json"
- run: actionlint

0 comments on commit 44cc56d

Please sign in to comment.