Skip to content

Commit

Permalink
chore: enable container builds on more events
Browse files Browse the repository at this point in the history
For testing allow us to build the containers. Allow workflow_dispatch to
rebuild the containers. Always push the container when running a PR.
  • Loading branch information
cardoe committed Aug 6, 2024
1 parent 05a08b5 commit 5fbcf93
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,enable={{is_default_branch}}
type=ref,event=branch
labels: |
org.opencontainers.image.title=dnsmasq for Understack's Ironic
env:
Expand Down Expand Up @@ -116,7 +117,6 @@ jobs:
- name: setup docker buildx
uses: docker/setup-buildx-action@v3
- name: login to ghcr.io
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -132,6 +132,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=tag
type=ref,event=pr
type=ref,event=branch
labels: |
org.opencontainers.image.title=${{ matrix.container.title }}
env:
Expand All @@ -147,7 +148,7 @@ jobs:
with:
file: containers/Dockerfile.${{ matrix.container.name }}
pull: true # ensure we always have an up to date source
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
Expand Down

0 comments on commit 5fbcf93

Please sign in to comment.