Skip to content

Commit

Permalink
Update build-and-push.yaml for docker compliance and pr push (#7)
Browse files Browse the repository at this point in the history
* Update build-and-push.yaml for docker compliance
  • Loading branch information
samirtahir91 authored Mar 29, 2024
1 parent f60ca5f commit f7accff
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ on:
push:
branches:
- "main"
tags:
- "v*.*.*"

env:
REGISTRY_IMAGE: samirtahir91076/github-app-operator
Expand Down Expand Up @@ -30,6 +32,12 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -48,9 +56,12 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
provenance: mode=max
sbom: true
tags: ${{ steps.meta.outputs.tags }}
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push=true
-
name: Export digest
run: |
Expand Down

0 comments on commit f7accff

Please sign in to comment.