From 8ed91f07d5a7c582fba8121b66d72bfe5f506c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 14:48:14 +0200 Subject: [PATCH 01/13] feat(ci): add GitHub workflow to run shellcheck --- .github/workflows/ci.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..342dbb3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +--- +name: CI + +on: + pull_request: + workflow_dispatch: + push: + branches: [feat/shellcheck, main, master, prod] + +# The list of permissions is explained on the GitHub doc: +# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs +permissions: + contents: read + +env: + SHELLCHECK_VERSION: "0.11.0" + +jobs: + shellcheck: + name: "ShellCheck" + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5 + - shell: bash + run: | + curl --silent --location https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz \ + | tar --extract --xz --file - --directory=/tmp + sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ + - shell: bash + run: | + pushd "${GITHUB_WORKSPACE}" + find . -name "*.sh" -exec shellcheck -S info -s bash {} + + popd +... From 007a37148ad26e9c751a936927c597ea560ed882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 14:56:18 +0200 Subject: [PATCH 02/13] feat(ci): name actions --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 342dbb3..1514b87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,14 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - - shell: bash + - name: Install shellcheck + shell: bash run: | curl --silent --location https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz \ | tar --extract --xz --file - --directory=/tmp sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ - - shell: bash + - name: Run shellcheck + shell: bash run: | pushd "${GITHUB_WORKSPACE}" find . -name "*.sh" -exec shellcheck -S info -s bash {} + From 327b5ecb9dcd5f7062e57b239b23f388e2625896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 15:13:20 +0200 Subject: [PATCH 03/13] feat(ci): use 'working-directory' instead of pushd+popd --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1514b87..2c41def 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,8 +29,7 @@ jobs: sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ - name: Run shellcheck shell: bash + working-directory: "${GITHUB_WORKSPACE}" run: | - pushd "${GITHUB_WORKSPACE}" find . -name "*.sh" -exec shellcheck -S info -s bash {} + - popd ... From 71eae41fa86df89ef79df7009b3dcf97b473b298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 15:20:17 +0200 Subject: [PATCH 04/13] feat(ci): rely on default working-directory --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c41def..62053a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,6 @@ jobs: sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ - name: Run shellcheck shell: bash - working-directory: "${GITHUB_WORKSPACE}" run: | find . -name "*.sh" -exec shellcheck -S info -s bash {} + ... From a285bb9c33c585d6cfbdaccc4aad69420ab22378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 15:37:56 +0200 Subject: [PATCH 05/13] chore(ci): coding style --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62053a9..7a615f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: # The list of permissions is explained on the GitHub doc: # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs permissions: + actions: read contents: read env: @@ -18,14 +19,14 @@ env: jobs: shellcheck: name: "ShellCheck" - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - name: Install shellcheck shell: bash run: | - curl --silent --location https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz \ - | tar --extract --xz --file - --directory=/tmp + curl --silent --location --output=shellcheck.tar.xz https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz + tar --extract --xz --file=shellcheck.tar.xz --directory /tmp sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ - name: Run shellcheck shell: bash From bbe178be606f0871ac8743e0c01974d19737c83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 15:40:50 +0200 Subject: [PATCH 06/13] fix(ci): fix shellcheck run --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a615f2..bdeeebb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,8 +25,8 @@ jobs: - name: Install shellcheck shell: bash run: | - curl --silent --location --output=shellcheck.tar.xz https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz - tar --extract --xz --file=shellcheck.tar.xz --directory /tmp + curl --silent --location --remote-name https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz + tar --extract --xz --file shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz --directory /tmp sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ - name: Run shellcheck shell: bash From 635cc1c869dbc17ae9bb9fdf7ee424eda216c4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Mon, 8 Jun 2026 17:30:38 +0200 Subject: [PATCH 07/13] feat(ci): use shared action --- .github/workflows/ci.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdeeebb..0022a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: pull_request: workflow_dispatch: push: - branches: [feat/shellcheck, main, master, prod] + branches: [main, master, prod] # The list of permissions is explained on the GitHub doc: # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs @@ -13,23 +13,10 @@ permissions: actions: read contents: read -env: - SHELLCHECK_VERSION: "0.11.0" - jobs: shellcheck: name: "ShellCheck" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 - - name: Install shellcheck - shell: bash - run: | - curl --silent --location --remote-name https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz - tar --extract --xz --file shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz --directory /tmp - sudo mv /tmp/shellcheck-v${SHELLCHECK_VERSION}/shellcheck /usr/local/bin/ - - name: Run shellcheck - shell: bash - run: | - find . -name "*.sh" -exec shellcheck -S info -s bash {} + + - uses: Scalingo/actions/shellcheck@main ... From ed9839be2bc4bea9d51fdf30f82fbb05bbc3f7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Tue, 9 Jun 2026 14:41:44 +0200 Subject: [PATCH 08/13] feat(ci): update CI workflow to use our shellcheck action --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0022a92..ad94a7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,5 +18,10 @@ jobs: name: "ShellCheck" runs-on: ubuntu-latest steps: - - uses: Scalingo/actions/shellcheck@main + - uses: actions/checkout@v6 + - uses: Scalingo/actions/shellcheck@feat/shellcheck + with: + shellcheck-severity: style + files: + - cmnlib.sh ... From 15e26edaab2d0338c2da7c41686f28694cf2e085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Tue, 9 Jun 2026 14:44:23 +0200 Subject: [PATCH 09/13] feat(ci): fix CI workflow --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad94a7d..2993915 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,6 @@ jobs: - uses: Scalingo/actions/shellcheck@feat/shellcheck with: shellcheck-severity: style - files: - - cmnlib.sh + files: | + cmnlib.sh ... From cb3dfb5acd117bdf861e9df6d51da8d18aa3e93c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Tue, 9 Jun 2026 15:36:03 +0200 Subject: [PATCH 10/13] fix(ci): update CI workflow Remove 'actions/checkout' step, now integrated in the called action. --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2993915..04b9d29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,6 @@ jobs: name: "ShellCheck" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v6 - uses: Scalingo/actions/shellcheck@feat/shellcheck with: shellcheck-severity: style From 17d2fb43b8c5cc7d68da11671291b7cafaf66547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Wed, 10 Jun 2026 11:09:29 +0200 Subject: [PATCH 11/13] feat(ci): make CI fail --- cmnlib.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmnlib.sh b/cmnlib.sh index b0b9392..d04c8a3 100644 --- a/cmnlib.sh +++ b/cmnlib.sh @@ -14,6 +14,9 @@ # They shouldn't be used outside of cmnlib. # +# This is temporary, to test ShellCheck Github CI workflow. +# We expect it to make ShellCheck complain: +echo "${foo}" _CMN_VERSION_=20260320 From 014b9b8d3a7ef16deebd524671428e48c823fd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20KUBLER?= Date: Wed, 10 Jun 2026 11:11:05 +0200 Subject: [PATCH 12/13] feat(shellcheck): remove failing line introduced in last commit --- cmnlib.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/cmnlib.sh b/cmnlib.sh index d04c8a3..b0b9392 100644 --- a/cmnlib.sh +++ b/cmnlib.sh @@ -14,9 +14,6 @@ # They shouldn't be used outside of cmnlib. # -# This is temporary, to test ShellCheck Github CI workflow. -# We expect it to make ShellCheck complain: -echo "${foo}" _CMN_VERSION_=20260320 From 330a2e88b3af0f51fac976f9a8d096304ac917a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 10 Jun 2026 14:56:52 +0200 Subject: [PATCH 13/13] fix(ci): use proper branch for ShellCheck action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Étienne M. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04b9d29..a55f029 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: name: "ShellCheck" runs-on: ubuntu-latest steps: - - uses: Scalingo/actions/shellcheck@feat/shellcheck + - uses: Scalingo/actions/shellcheck@main with: shellcheck-severity: style files: |