Skip to content

Fix dev-deploy.yml: deploy triggering commit instead of tip of dev branch#58

Draft
Copilot wants to merge 2 commits into
devfrom
copilot/fix-dev-deploy-workflow-branch
Draft

Fix dev-deploy.yml: deploy triggering commit instead of tip of dev branch#58
Copilot wants to merge 2 commits into
devfrom
copilot/fix-dev-deploy-workflow-branch

Conversation

Copilot AI commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

dev-deploy.yml was hardcoding ref: dev, causing it to always build and push whatever was at the current tip of dev — not the specific commit that passed CI. This creates a race condition where newer, untested commits get deployed.

Change

  • dev-deploy.yml: Replace ref: dev with ref: ${{ github.event.workflow_run.head_sha }} — the same pattern prod-deploy.yml already uses correctly.
# before
- uses: actions/checkout@v6.0.3
  with:
    ref: dev

# after
- uses: actions/checkout@v6.0.3
  with:
    ref: ${{ github.event.workflow_run.head_sha }}

github.event.workflow_run.head_sha is the exact commit SHA that triggered the upstream CI workflow, so the deployed image will always correspond to the code that was actually tested.

Copilot AI changed the title [WIP] Fix dev-deploy workflow to use dev branch instead of main Fix dev-deploy.yml: deploy triggering commit instead of tip of dev branch Jun 28, 2026
Copilot AI requested a review from vanalmsick June 28, 2026 19:49
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.

Github dev-deploy.yml workflow uses main branch and not dev branch

2 participants