From 5fbcf93026513f396b82fb06c89976349cd8ddab Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 6 Aug 2024 11:08:46 -0500 Subject: [PATCH] chore: enable container builds on more events For testing allow us to build the containers. Allow workflow_dispatch to rebuild the containers. Always push the container when running a PR. --- .github/workflows/containers.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/containers.yaml b/.github/workflows/containers.yaml index 35633394d..8042321c5 100644 --- a/.github/workflows/containers.yaml +++ b/.github/workflows/containers.yaml @@ -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: @@ -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 @@ -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: @@ -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 }}