Skip to content

Skip build-test-promote job for fork pull requests lacking registry secrets - #184

Draft
alexiri with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-build-image
Draft

Skip build-test-promote job for fork pull requests lacking registry secrets#184
alexiri with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-build-image

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown

The Build, Test, Promote (cosmic) / Build image / Build and push image (amd64) job was failing with Error: Input required and not supplied: password during the podman-login step.

Root cause

  • The failing run was triggered by a PR opened from an external fork (aaaaadrien/atomic-desktop).
  • GitHub Actions withholds repository secrets from workflows triggered by pull_request events when the head repository differs from the base repository — this is a platform-level restriction, not something the workflow can override.
  • With secrets.QUAY_PASSWORD unavailable, REGISTRY_TOKEN was empty, so podman-login failed before the image build could even start.
  • Confirmed this is fork-specific: pushes to main, same-repo branch PRs, and Dependabot PRs (which run from branches in-repo, not forks) all successfully authenticate and build.

Fix

  • Added a job-level if guard to build-test-promote in .github/workflows/build.yml that skips the job for pull_request events when the PR's head repo doesn't match the base repo:
    if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
  • All other triggers (push, schedule, workflow_dispatch) and same-repo PRs continue to run unchanged. Fork PRs will now show as skipped instead of failing, since they can never authenticate to the registry.

Co-authored-by: alexiri <5055697+alexiri@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job for building and pushing image Skip build-test-promote job for fork pull requests lacking registry secrets Sep 8, 2026
Copilot AI requested a review from alexiri September 8, 2026 11:22
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