fix: use env context instead of secrets in step if condition (#118)
The 'secrets' context is not available in step-level 'if:' expressions. Use env.WEBHOOK_URL (populated from secrets) instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Juan Manuel Servera committed
May 19, 2026 at 17:10 UTC
8446a5e19b881f536f2578265cc861d0e8ea5cb1
1 file changed
+1
-1
.github/workflows/crawl-and-publish.yml
+1
-1
@@ -538,7 +538,7 @@ jobs:
538
gh api graphql -f query="mutation { createDiscussion(input: {repositoryId: \"$REPO_ID\", categoryId: \"$CAT_ID\", title: \"Week $WEEK — Tech Trends Summary\", body: $BODY}) { discussion { url } } }"
539
540
- name: Post to webhook
541
- if: secrets.WEBHOOK_URL != ''
541
+ if: env.WEBHOOK_URL != ''
542
env:
543
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
544
run: |