From 99465e8c4da9359e5d6ce0ee8189f25544d753e4 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Wed, 25 Oct 2023 15:00:45 +1300 Subject: [PATCH] feat: lint GitHub Actions workflows Works around for now. --- .github/dependabot.yml | 4 ++++ .github/workflows/actionlint.dockerfile | 4 ++++ .github/workflows/main.yml | 5 +++++ 3 files changed, 13 insertions(+) create mode 100644 .github/workflows/actionlint.dockerfile diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 404adb9e4..b70f17e89 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,10 @@ updates: directory: "/" schedule: interval: daily +- package-ecosystem: "docker" + directory: "/.github/workflows" + schedule: + interval: daily - package-ecosystem: npm directory: "/" schedule: diff --git a/.github/workflows/actionlint.dockerfile b/.github/workflows/actionlint.dockerfile new file mode 100644 index 000000000..934221732 --- /dev/null +++ b/.github/workflows/actionlint.dockerfile @@ -0,0 +1,4 @@ +# Workaround for https://github.com/dependabot/dependabot-core/issues/8362. +# Once that is fixed, remove this file and replace the build and run lines +# in `.github/workflows/main.yml` with a `uses: docker://rhysd/…` line. +FROM rhysd/actionlint:1.6.26@sha256:2362769b1d75056da70e7af1b12d9e52746f3a123b8f22a4322869e8f2cd45f2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 49cec6d4d..73453c42e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,6 +29,11 @@ jobs: - name: format run: npm run format -- --fix=false # ensure eslint is not configured to --fix + - name: Download actionlint + run: docker build --tag actionlint - < .github/workflows/actionlint.dockerfile + + - name: Run actionlint to check workflow files + run: docker run --volume="${PWD}:/repo" --workdir=/repo actionlint -color # Configure access to AWS / EKS - name: Setup kubectl