fix: remove invalid secrets-context if: condition from release workflows - #66
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release.ymlandcontainer-canary.ymlboth 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 thev1.4.2tag push never actually triggered anything.Root cause, found via
actionlint(plain YAML parsing/yaml.safe_loaddoesn't catch this — it's a GitHub Actions schema rule, not a YAML syntax error):The
secretscontext isn't available in step-levelif:conditionals. I'd addedif: ${{ 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_USERNAMEare already required repo secrets, so the login step can just be unconditional, matching the existingrepo.indexarr.net/ghcr.iologin steps in the same jobs.Verification
actionlinton 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.🤖 Generated with Claude Code