Skip to content

Commit

Permalink
Tweak container build GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferya committed Aug 30, 2024
1 parent 7ade0b0 commit 8cfef25
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Build and publish

on:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
push:
branches: [ "main" ]
branches:
- '**' # all branches; with or without '/'
- '!main' # exclude main
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]

env:
# Use docker.io for Docker Hub if empty
Expand Down Expand Up @@ -39,6 +42,10 @@ jobs:
# with:
# cosign-release: 'v2.1.1'

# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
Expand Down Expand Up @@ -76,8 +83,7 @@ jobs:
id: build-and-push
uses: docker/bake-action@v5 #v5.3.0
with:
#push: ${{ github.event_name != 'pull_request' }}
push: true
push: ${{ github.event_name != 'pull_request' }}
load: true
#provenance: true
#sbom: true
Expand Down

0 comments on commit 8cfef25

Please sign in to comment.