Skip to content

Commit bdd261b

Browse files
dotradeproclaude
andcommitted
fix(ci): drop secret-context if:, let script own the missing-token error
The previous workflow used ``if: ${{ secrets.WIKI_SYNC_TOKEN == '' }}`` to fail fast before running the sync script. GitHub rejected the workflow at YAML-validation time (0 jobs executed, the run went straight to ``failure`` before any step scheduled), likely because secret-context references inside ``if:`` can trip startup validation when the referenced secret isn't configured. Simpler: just let sync-wiki.sh detect the empty env var and exit 1 with its own "No token in env" message. Same UX, one fewer YAML construct to fight. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b1954b6 commit bdd261b

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

.github/workflows/sync-wiki.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,9 @@ jobs:
4848
- name: Checkout repo (with docs/)
4949
uses: actions/checkout@v4
5050

51-
- name: Fail fast if WIKI_SYNC_TOKEN is missing
52-
if: ${{ secrets.WIKI_SYNC_TOKEN == '' }}
53-
run: |
54-
echo "::error::WIKI_SYNC_TOKEN secret is not set — see .github/workflows/sync-wiki.yml comment for provisioning steps." >&2
55-
exit 1
56-
5751
- name: Run sync
5852
env:
53+
# WIKI_SYNC_TOKEN is a repo secret the maintainer sets once.
54+
# sync-wiki.sh exits 1 with a clear error if it's empty.
5955
WIKI_SYNC_TOKEN: ${{ secrets.WIKI_SYNC_TOKEN }}
6056
run: bash scripts/sync-wiki.sh

0 commit comments

Comments
 (0)