Skip to content

Commit

Permalink
Only push docker image on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen committed May 14, 2024
1 parent 6a944dc commit bfe6b09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ jobs:
username: "${{ github.repository_owner }}"
password: "${{ secrets.GITHUB_TOKEN }}"

- name: Build
if: github.event_name == 'pull_request'
run: nix build --ignore-environment --keep PATH --keep IMAGE_NAME

- name: Build and publish docker image
if: github.event_name != 'pull_request'
run: nix develop .#docker --ignore-environment --keep PATH --keep IMAGE_NAME --command publish "${{ steps.meta.outputs.tags }}"
env:
IMAGE_NAME: "${{ env.IMAGE_NAME }}"

0 comments on commit bfe6b09

Please sign in to comment.