Skip to content

Commit 343f395

Browse files
committed
fix: prevent Docker image push on pull requests
The build-and-test workflow was pushing Docker images to ghcr.io on every pull request, which wastes registry storage and CI resources. This change makes the push conditional so that: - Pull requests: build and test only (no push) - Main branch pushes: build, test, and push - Version tags: build, test, and push - Manual workflow dispatch: build, test, and push This aligns with the pattern used in mission-control repository.
1 parent d101a3a commit 343f395

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
with:
5656
context: .
5757
platforms: linux/amd64,linux/arm64
58-
push: true
58+
push: ${{ github.event_name != 'pull_request' }}
5959
tags: ${{ steps.meta.outputs.tags }}
6060
labels: ${{ steps.meta.outputs.labels }}
6161
cache-from: |

0 commit comments

Comments
 (0)