Skip to content

fix(ci): create release tag inline to bypass docker-action ownership issue#1913

Merged
pethers merged 1 commit into
mainfrom
copilot/fix-broken-release-flow
May 9, 2026
Merged

fix(ci): create release tag inline to bypass docker-action ownership issue#1913
pethers merged 1 commit into
mainfrom
copilot/fix-broken-release-flow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

Problem

The release workflow has been failing for v0.7.43 (and likely the two prior attempts on 2026-05-09) with:

Error: A branch or tag with the name 'v0.7.43' could not be found

…in the Build Release Package job's checkout step (run 25604887285).

Root cause

The real failure is in the upstream Prepare Release job. After the prepare job was moved to run inside the cypress/browsers container, stefanzweifel/git-auto-commit-action (a Docker action) fails silently. From the actual job log for step 11:

Started: bash /__w/_actions/stefanzweifel/git-auto-commit-action/.../entrypoint.sh
INPUT_REPOSITORY value: .
fatal: detected dubious ownership in repository at '/__w/blacktrigram/blacktrigram'
To add an exception for this directory, call:
    git config --global --add safe.directory /__w/blacktrigram/blacktrigram
...
Working tree clean. Nothing to commit.

The Docker action launches its own container and does not inherit the host job's safe.directory git config. git status errors out, and with the default skip_dirty_check: false the action interprets the failure as "no changes" and exits successfully without committing, tagging, or pushing. The version bump never lands on main and the tag is never created — so the downstream build job's actions/checkout with ref: ${{ github.event.inputs.version }} cannot find it.

This started failing once the prepare job adopted the cypress/browsers container (commit 8a1b52e9fa); prior runs on the bare ubuntu-latest runner did not hit this because file ownership matched the runner UID.

Fix

Replace stefanzweifel/git-auto-commit-action with an inline git commit + tag + push step that runs in the container's own shell, where we can set safe.directory for the actual UID running git. git is already installed in the container (line 80 of the workflow).

The new step:

  • Adds safe.directory for $GITHUB_WORKSPACE
  • Configures the same github-actions[bot] identity used previously
  • Commits the version bump (idempotent — skips if git diff --cached --quiet)
  • Creates the annotated tag (idempotent — skips if tag exists)
  • Pushes HEAD to the dispatching branch (HEAD:${GITHUB_REF_NAME}) — needed because actions/checkout leaves the repo in a detached-HEAD state — and pushes the tag

A code comment explains why we bypass the Docker action so this isn't accidentally reverted.

Validation

  • YAML validated with yaml.safe_load
  • parallel_validation (Code Review + CodeQL Security Scan) — no findings ✅

Notes / follow-ups

  • The first push of v0.7.43 should now succeed via this fix on the next workflow_dispatch.
  • The workflow already has permissions: contents: write on the prepare job, so the default GITHUB_TOKEN from actions/checkout can push the commit and tag.

@github-actions github-actions Bot added the infrastructure CI/CD and build infrastructure label May 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

  • .github/workflows/release.yml

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

📸 Automated UI Screenshots

📋 Screenshots Captured (8)

# Screenshot
1 01-splash-screen.png - 01 splash screen.png
2 02-intro-screen-menu.png - 02 intro screen menu.png
3 03-intro-screen-archetype-selector.png - 03 intro screen archetype selector.png
4 04-controls-screen.png - 04 controls screen.png
5 05-philosophy-screen.png - 05 philosophy screen.png
6 06-training-screen.png - 06 training screen.png
7 07-combat-screen-practice.png - 07 combat screen practice.png
8 08-combat-screen-versus.png - 08 combat screen versus.png

📦 Download Screenshots

📥 Download all screenshots from workflow artifacts

Screenshots are preserved as workflow artifacts for 30 days.


🤖 Generated by Playwright automation

@pethers pethers marked this pull request as ready for review May 9, 2026 16:17
Copilot AI review requested due to automatic review settings May 9, 2026 16:17
@pethers pethers merged commit 9ba9052 into main May 9, 2026
11 of 12 checks passed
@pethers pethers deleted the copilot/fix-broken-release-flow branch May 9, 2026 16:17
Copy link
Copy Markdown
Contributor

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

Updates the release GitHub Actions workflow to reliably commit the version bump and create/push the release tag when running inside the cypress/browsers container (avoiding the “dubious ownership” failure mode of a Docker-based auto-commit action).

Changes:

  • Replace stefanzweifel/git-auto-commit-action with inline git commands that set safe.directory, commit the version bump, create an annotated tag, and push commit+tag.
  • Add an explanatory workflow comment documenting why the Docker action is intentionally avoided in this container job.

fi

# actions/checkout leaves the repo in a detached HEAD state for
# workflow_dispatch on a branch, so push HEAD explicitly to main.
Comment on lines +146 to +149
# actions/checkout leaves the repo in a detached HEAD state for
# workflow_dispatch on a branch, so push HEAD explicitly to main.
git push origin "HEAD:${GITHUB_REF_NAME}"
git push origin "refs/tags/${VERSION}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure CI/CD and build infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants