Skip to content

Skip Docker login and publishing in pull request pipelines - #263

Open
beevelop wants to merge 1 commit into
latestfrom
fix/skip-docker-publish-on-pull-requests
Open

beevelop wants to merge 1 commit into
latestfrom
fix/skip-docker-publish-on-pull-requests

Conversation

@beevelop

Copy link
Copy Markdown
Owner

Summary

  • Run Docker builds on pull_request events, skipping Docker Hub login and retaining push: false for PR builds.
  • Restrict branch-push workflows to latest, preserving release-tag and scheduled publishing.
  • Document which pipelines build only and which publish images.

Why

The failing Dependabot pipeline is triggered by a push to its update branch, not by pull_request. Dependabot runs do not receive the Docker Hub credentials, so an unconditional login fails with Username and password required. Adding only a PR-event login guard would not fix those branch-push runs. PR events now provide build-only validation instead.

Validation

  • actionlint passed.
  • Verified eight event scenarios: Dependabot and fork PRs build without login/push; Dependabot and feature-branch pushes do not trigger; latest pushes, release tags, and scheduled runs still publish; unrelated tags do not trigger.

Run pull requests as build-only checks and restrict push-triggered publishing to the latest branch and release tags. Skip Docker Hub login on pull_request events.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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