Skip to content

Commit

Permalink
feat: check github action syntax with actionlint
Browse files Browse the repository at this point in the history
  • Loading branch information
jbergstroem committed Sep 4, 2021
1 parent 4afe5ef commit 23ff87f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/lint-actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: lint
on:
pull_request:
paths:
- ".github/workflows/*.yml"

jobs:
actionlint:
name: actionlint
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2.3.4
- name: Install Actionlint
env:
ACTIONLINT_VERSION: 1.6.3
run: |
wget -q -O- "https://github.com/rhysd/actionlint/releases/download/v${ACTIONLINT_VERSION}/actionlint_${ACTIONLINT_VERSION}_linux_amd64.tar.gz" | tar -x -z -C . actionlint && \
mv actionlint /usr/local/bin
- name: Run Actionlint
run: |
actionlint -format '{{range $err := .}}::error file={{$err.Filepath}},line={{$err.Line}},col={{$err.Column}}::{{$err.Message}}{{end}}' -ignore 'SC2016:' .github/workflows/*.yml
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v2.3.4
- name: fetch hadolint version
run: echo "HADOLINT_VERSION=$(cat HADOLINT_VERSION)" >> ${GITHUB_ENV}
run: echo "HADOLINT_VERSION=$(cat HADOLINT_VERSION)" >> "${GITHUB_ENV}"
- name: install hadolint
run: |
wget -q -O hadolint https://github.com/hadolint/hadolint/releases/download/v${{ env.HADOLINT_VERSION }}/hadolint-Linux-x86_64 && \
Expand All @@ -26,5 +26,3 @@ jobs:
bash_unit -v
- name: run suite
run: bash_unit test/*.sh
env:
VERSION: ${{ steps.assign.outputs.version }}

0 comments on commit 23ff87f

Please sign in to comment.