Skip to content

Commit

Permalink
build: build containers off pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
blacha committed Feb 19, 2025
1 parent d38420b commit dae6b36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ jobs:
build-containers:
needs: setup
if: ${{ fromJson(needs.setup.outputs.tags).needs_containers == true }}

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -170,7 +169,7 @@ jobs:
with:
context: packages/cli
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,"name=ghcr.io/${{ github.repository }}/cli",push-by-digest=true,push=true
outputs: type=image,"name=ghcr.io/${{ github.repository }}/cli",push-by-digest=true,push=${{ fromJson(needs.setup.outputs.tags).needs_containers == true }}
build-args: |
GIT_HASH=${{ github.sha }}
GIT_VERSION=${{ needs.setup.outputs.version }}
Expand All @@ -182,7 +181,7 @@ jobs:
with:
context: packages/server
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,"name=ghcr.io/${{ github.repository }}/server",push-by-digest=true,push=true
outputs: type=image,"name=ghcr.io/${{ github.repository }}/server",push-by-digest=true,push=${{ fromJson(needs.setup.outputs.tags).needs_containers == true }}
build-args: |
GIT_HASH=${{ github.sha }}
GIT_VERSION=${{ needs.setup.outputs.version }}
Expand All @@ -209,6 +208,8 @@ jobs:
# Find all the containers built from the matrix jobs then tag and publish them
name: Merge and publish containers

if: ${{ fromJson(needs.setup.outputs.tags).needs_containers == true }}

permissions:
id-token: write
contents: read
Expand Down

0 comments on commit dae6b36

Please sign in to comment.