Skip to content

Commit bfe6b09

Browse files
committed
Only push docker image on main branch
1 parent 6a944dc commit bfe6b09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/build-docker.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,12 @@ jobs:
5151
username: "${{ github.repository_owner }}"
5252
password: "${{ secrets.GITHUB_TOKEN }}"
5353

54+
- name: Build
55+
if: github.event_name == 'pull_request'
56+
run: nix build --ignore-environment --keep PATH --keep IMAGE_NAME
57+
5458
- name: Build and publish docker image
59+
if: github.event_name != 'pull_request'
5560
run: nix develop .#docker --ignore-environment --keep PATH --keep IMAGE_NAME --command publish "${{ steps.meta.outputs.tags }}"
5661
env:
5762
IMAGE_NAME: "${{ env.IMAGE_NAME }}"

0 commit comments

Comments
 (0)