Skip to content

Commit 6a52014

Browse files
committed
Added actionlint
1 parent 115c1b4 commit 6a52014

File tree

3 files changed

+27
-8
lines changed

3 files changed

+27
-8
lines changed

.github/workflows/actions.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Actions
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
10+
jobs:
11+
actionlint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
- name: Check workflow files
16+
uses: docker://rhysd/actionlint:latest
17+
with:
18+
args: -color

.github/workflows/pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
- name: Validate local docker compose files
2323
run: |
2424
DC=$(COMPOSE_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.yml config --quiet 2>&1)
25-
[ -z "$DC" ] || { echo $DC; exit 1; }
25+
[ -z "$DC" ] || { echo "$DC"; exit 1; }
2626
2727
- name: Validate server docker compose files
2828
run: |
2929
DC=$(COMPOSE_SERVER_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml config --quiet 2>&1)
30-
[ -z "$DC" ] || { echo $DC; exit 1; }
30+
[ -z "$DC" ] || { echo "$DC"; exit 1; }
3131
DC=$(COMPOSE_SERVER_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.dev.yml config --quiet 2>&1)
32-
[ -z "$DC" ] || { echo $DC; exit 1; }
32+
[ -z "$DC" ] || { echo "$DC"; exit 1; }
3333
DC=$(COMPOSE_SERVER_DOMAIN=test.itkdev.dk docker compose --file templates/${{ matrix.version }}/docker-compose.server.yml --file templates/${{ matrix.version }}/docker-compose.redirect.yml config --quiet 2>&1)
34-
[ -z "$DC" ] || { echo $DC; exit 1; }
34+
[ -z "$DC" ] || { echo "$DC"; exit 1; }

.github/workflows/workflow-template.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ jobs:
99
- uses: actions/checkout@v5
1010

1111
- run: |
12-
docker pull mikefarah/yq
13-
for f in $(find github/workflows/ -name '*.yaml'); do
14-
docker run --rm --volume "$PWD":/workdir mikefarah/yq "$f" > /dev/null
15-
done
12+
# https://www.shellcheck.net/wiki/SC2044
13+
find github/workflows/ -name '*.yaml' -exec sh -c '
14+
echo "$1"
15+
docker run --rm --volume "$PWD":/workdir mikefarah/yq "$1" > /dev/null
16+
' sh {} \;
1617
1718
shellcheck:
1819
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)