From 4b7d369ffe5a30e8218c4490b681eb18b824c177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Snoksrud?= Date: Fri, 28 Aug 2026 14:38:27 +0200 Subject: [PATCH] discord-notify: run the script through bash, not its shebang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every notification since the action landed has failed with exit 127 in about 16ms, so the alert never reached Discord — including the smoke-test failures the schedule fires on main. The action executed the script directly and relied on `#!/usr/bin/env bash`. The self-hosted runners are NixOS: the step's own shell is an absolute /nix/store path and bash is not on PATH, so env cannot resolve an interpreter and exec fails 127. gaia had this right before the move. It called `bash .github/scripts/discord-notify.sh`, which never consulted the shebang; turning that into a direct execution is what introduced this. The callers set fail-on-undeliverable: false, so the lost alert did not fail their jobs — a notification that silently does not arrive, which is the failure this action exists to prevent, in a new place. --- discord-notify/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/discord-notify/action.yml b/discord-notify/action.yml index b85c3f6..38c61e2 100644 --- a/discord-notify/action.yml +++ b/discord-notify/action.yml @@ -55,4 +55,7 @@ runs: DISCORD_CONTENT: ${{ inputs.content }} DISCORD_PAYLOAD: ${{ inputs.payload }} DISCORD_FAIL_ON_UNDELIVERABLE: ${{ inputs.fail-on-undeliverable }} - run: '"$GITHUB_ACTION_PATH/discord-notify.sh"' + # Invoked through `bash` rather than executed directly: the self-hosted + # runners are NixOS, where bash is not on PATH, so the script's + # `#!/usr/bin/env bash` cannot resolve an interpreter and exec fails 127. + run: bash "$GITHUB_ACTION_PATH/discord-notify.sh"