Skip to content

Fix Homebrew tap auto-update workflow#56

Merged
turlockmike merged 1 commit intomasterfrom
fix/homebrew-workflow
Feb 20, 2026
Merged

Fix Homebrew tap auto-update workflow#56
turlockmike merged 1 commit intomasterfrom
fix/homebrew-workflow

Conversation

@turlockmike
Copy link
Owner

Summary

  • Move secret existence check from job-level if to step-level check
  • Job-level if: ${{ secrets.HOMEBREW_TAP_TOKEN != '' }} breaks workflow parsing entirely, preventing the release workflow from running on tag pushes

Test plan

  • Merge, delete v0.3.2 tag, re-tag and push to verify full pipeline

Generated with Claude Code

The job-level `if: ${{ secrets.HOMEBREW_TAP_TOKEN != '' }}` breaks
workflow parsing. Secrets context isn't reliably available in job-level
if conditions. Move to a step-level check instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 20, 2026 23:48
@turlockmike turlockmike merged commit 3e21b3e into master Feb 20, 2026
6 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical workflow parsing issue that prevented the release workflow from running when tags are pushed. The issue stemmed from using a job-level if condition that checks for secret existence, which breaks GitHub Actions workflow parsing.

Changes:

  • Removed job-level if condition on update-homebrew job that was checking for HOMEBREW_TAP_TOKEN secret
  • Added a dedicated "Check for tap token" step that sets a skip output variable when the token is missing
  • Added conditional if: steps.check_token.outputs.skip != 'true' guards to all subsequent steps in the job

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

run: |
if [ -z "$TOKEN" ]; then
echo "HOMEBREW_TAP_TOKEN not set, skipping homebrew update"
echo "skip=true" >> $GITHUB_OUTPUT
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skip logic has an issue: when the TOKEN is set (not empty), the skip output variable is never set, so it will be empty/undefined. This means subsequent steps checking steps.check_token.outputs.skip != 'true' will pass when the token exists (correct), but for the wrong reason (the output is undefined, not 'false').

To make the logic clearer and more robust, you should explicitly set the skip value for both cases. Add an else clause to set skip=false when the token exists.

Suggested change
echo "skip=true" >> $GITHUB_OUTPUT
echo "skip=true" >> $GITHUB_OUTPUT
else
echo "skip=false" >> $GITHUB_OUTPUT

Copilot uses AI. Check for mistakes.
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.

2 participants