Skip to content

Commit

Permalink
Introduce actionlint to lint GitHub Actions workflows (#15449)
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Feb 13, 2025
1 parent 0f6bfdb commit 8e02a42
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
23 changes: 23 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
- runs-on
- runner=*
- family=*
- ram=*

# 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: null

# Configuration for file paths. The keys are glob patterns to match to file
# paths relative to the repository root. The values are the configurations for
# the file paths. Note that the path separator is always '/'.
# The following configurations are available.
#
# "ignore" is an array of regular expression patterns. Matched error messages
# are ignored. This is similar to the "-ignore" command line option.
paths:
# .github/workflows/**/*.yml:
# ignore: []
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: bin/ci with_build_env 'make crystal docs threads=1'

- name: Set revision
run: echo $GITHUB_SHA > ./docs/revision.txt
run: echo "$GITHUB_SHA" > ./docs/revision.txt

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/lint-actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint GitHub Actions workflows
on:
push:
paths:
- '.github/workflows/*.yml'
pull_request:
paths:
- '.github/workflows/*.yml'

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check workflow files
uses: docker://rhysd/actionlint:latest
2 changes: 1 addition & 1 deletion .github/workflows/wasm32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
apt-add-repository -y deb http://apt.llvm.org/noble/ llvm-toolchain-noble-18 main
apt-get install -y llvm-18-dev lld-18
ln -s $(which wasm-ld-18) /usr/bin/wasm-ld
ln -s "$(which wasm-ld-18)" /usr/bin/wasm-ld
- name: Download wasm32 libs
run: |
Expand Down

0 comments on commit 8e02a42

Please sign in to comment.