Skip to content

ci: skip registry login and push on pull_request events - #18

Merged
skunxicat merged 1 commit into
mainfrom
fix/dependabot-pr-ci-no-registry-push
Oct 24, 2026
Merged

skunxicat merged 1 commit into
mainfrom
fix/dependabot-pr-ci-no-registry-push

Conversation

@skunxicat

Copy link
Copy Markdown
Member

Summary

Fixes the Build Installers / Build Base Image jobs failing on Dependabot PRs (e.g. #17) with:

username: dependabot[bot]
##[error]Password required

Dependabot-triggered pull_request runs cannot read the repository secrets (GHCR_PAT, AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY) used by docker/login-action and the Public ECR login, so the password resolves to empty and the login step errors. Those workflows also attempted to --push to GHCR/Public ECR, which a PR shouldn't do anyway.

Changes

  • Guard all credential/login steps (configure-aws-credentials, GHCR login, Public ECR login) with if: github.event_name != 'pull_request'.
  • Add a PUSH env and make each docker buildx build either --push (branch pushes) or build-only (--output=type=cacheonly) on PRs.
  • In build-base.yml, provide a dummy github_token secret file on PRs so the --secret mount still resolves without a push.

Net effect: PRs still validate that the Dockerfiles build; only pushes to main/develop log in and publish images.

Testing

  • Both workflow files validated as parseable YAML locally.
  • Behavioral verification happens on this PR's own checks: the build steps should now run build-only without attempting a registry login.

Dependabot PRs cannot read repo secrets, so docker/login-action failed
with 'Password required'. Guard all credential/login steps with
'if: github.event_name != pull_request' and make buildx push only on
branch pushes (build-only via cacheonly on PRs) so PRs still validate
that the Dockerfiles build.
@skunxicat
skunxicat merged commit 9b83fab into main Oct 24, 2026
2 checks passed
@skunxicat
skunxicat deleted the fix/dependabot-pr-ci-no-registry-push branch October 24, 2026 10:48
skunxicat added a commit that referenced this pull request Oct 24, 2026
…#20)

The Build and Release workflow runs on every PR (no paths filter) and its
build-base job logged into GHCR and Public ECR unconditionally, so
Dependabot PRs failed with 'Password required' before any build ran.

Guard all login/credential steps in both the build-base and build jobs
with 'if: github.event_name != pull_request', and make build-base push
only on branch pushes (cacheonly on PRs). The build job already builds
--load without pushing on PRs. Mirrors the fix applied to build-base.yml
and build-installers.yml in #18.
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.

1 participant