From 6970657f7acae2ec49dd35cf959781919b725272 Mon Sep 17 00:00:00 2001 From: Ondrej Belusky Date: Wed, 22 Jul 2026 14:55:18 +0200 Subject: [PATCH] Fix: read NTFY_TOKEN from inherited env first, input as fallback --- action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index 99bb490..6631f5b 100644 --- a/action.yml +++ b/action.yml @@ -10,7 +10,7 @@ inputs: description: 'ntfy topic' required: true ntfy_token: - description: 'ntfy auth token (bearer). Store in CI secret.' + description: 'ntfy auth token (bearer). Store in CI secret and pass via env:' default: '' required: false status: @@ -28,7 +28,6 @@ runs: env: NTFY_URL: ${{ inputs.ntfy_url }} NTFY_TOPIC: ${{ inputs.ntfy_topic }} - NTFY_TOKEN: ${{ inputs.ntfy_token }} MESSAGE: ${{ inputs.message }} run: | if [ "${{ inputs.status }}" = "failure" ]; then @@ -39,8 +38,9 @@ runs: TAGS="rocket,white_check_mark,🎉,docker" fi AUTH=() - if [ -n "${NTFY_TOKEN}" ]; then - AUTH=(-H "Authorization: Bearer ${NTFY_TOKEN}") + TOKEN="${NTFY_TOKEN:-${{ inputs.ntfy_token }}}" + if [ -n "$TOKEN" ]; then + AUTH=(-H "Authorization: Bearer ${TOKEN}") fi curl -sf \ -H "Title: CI Notification" \