Skip to content

Commit

Permalink
Push only on main
Browse files Browse the repository at this point in the history
  • Loading branch information
strokyl committed Feb 14, 2024
1 parent 0cdb39b commit 8c94af1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
type: boolean
description: (bool) Whether this is a release or not
default: false
push:
required: false
type: boolean
description: (bool) Whether we should push the image or not
default: true
env:
NAMESPACE: "conduktor"
LABEL_IMAGE_AUTHORS: "Conduktor <[email protected]>"
Expand All @@ -21,7 +26,7 @@ env:
jobs:
build-docker:
name: Build Platform Docker
runs-on: [cdk-large]
runs-on: [cdk-standard]
permissions:
id-token: write
contents: read
Expand Down Expand Up @@ -67,7 +72,7 @@ jobs:
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
push: ${{ inputs.push }}
file: docker/Dockerfile
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, labeled]
jobs:
Expand All @@ -24,6 +27,7 @@ jobs:
needs: [unit-test, integration-test]
with:
release: false
push: ${{ github.ref_name == 'main' }}
image_tags: |
type=sha
type=ref,event=branch
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,5 @@ jobs:
needs: [tags, unit-test, integration-test]
with:
release: true
push: true
image_tags: ${{ needs.tags.outputs.image_tags }}

0 comments on commit 8c94af1

Please sign in to comment.