Skip to content

fix: remove invalid secrets-context if: condition from release workflows - #66

Merged
thedancingdeveloper merged 1 commit into
mainfrom
fix/release-workflow-secrets-in-if
Aug 10, 2026
Merged

fix: remove invalid secrets-context if: condition from release workflows#66
thedancingdeveloper merged 1 commit into
mainfrom
fix/release-workflow-secrets-in-if

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Collaborator

Summary

release.yml and container-canary.yml both silently failed to parse after my earlier Docker Hub auth fix — every push/tag push produced a workflow run with 0 jobs and a generic "workflow file issue" failure, which is why the v1.4.2 tag push never actually triggered anything.

Root cause, found via actionlint (plain YAML parsing/yaml.safe_load doesn't catch this — it's a GitHub Actions schema rule, not a YAML syntax error):

release.yml:51:17: context "secrets" is not allowed here. available contexts are
"env", "github", "inputs", "job", "matrix", "needs", "runner", "steps", "strategy", "vars".

The secrets context isn't available in step-level if: conditionals. I'd added if: ${{ secrets.DOCKERHUB_TOKEN != '' }} to guard the new Docker Hub login step, which broke parsing of the entire file.

Fix

Drop the if: guard — DOCKERHUB_TOKEN/DOCKERHUB_USERNAME are already required repo secrets, so the login step can just be unconditional, matching the existing repo.indexarr.net/ghcr.io login steps in the same jobs.

Verification

  • actionlint on both files: no errors besides expected false-positive runner-label warnings (actionlint doesn't know this repo's custom self-hosted labels, which are already proven working elsewhere in CI).
  • python3 -c "import yaml; yaml.safe_load(...)" on all three touched workflow files: clean.
  • Diffed GitHub's actually-indexed file content against local at the broken commit to rule out a merge/encoding mismatch — confirmed byte-identical, so this really was a parse rejection, not a sync issue.

🤖 Generated with Claude Code

The `secrets` context isn't available in step-level `if:` conditionals
per GitHub Actions' schema (confirmed with actionlint — plain YAML
parsing doesn't catch this). This silently broke parsing of the
entire release.yml/container-canary.yml files: every push/tag
triggered a run with 0 jobs and a generic "workflow file issue"
failure, blocking the v1.4.2 release from running at all.

Since DOCKERHUB_TOKEN/DOCKERHUB_USERNAME are already required repo
secrets for this step to do anything useful, just make the Docker Hub
login unconditional, matching the existing repo.indexarr.net/ghcr.io
login steps in the same jobs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thedancingdeveloper
thedancingdeveloper merged commit aded771 into main Aug 10, 2026
4 of 5 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the fix/release-workflow-secrets-in-if branch August 10, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant