Skip to content

Commit

Permalink
Update build.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
YurBoiRene authored Nov 18, 2023
1 parent bb97601 commit 4c0867b
Showing 1 changed file with 18 additions and 28 deletions.
46 changes: 18 additions & 28 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ on:
- v*
pull_request:
jobs:
push-ghcr:
name: Build and push image
build:
runs-on: ubuntu-22.04
permissions:
packages: write
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: docker/[email protected]
with:
submodules: 'true'

image: tonistiigi/binfmt:qemu-v6.2.0
platforms: arm64
- uses: docker/[email protected]
with:
driver-opts: image=moby/buildkit
- uses: docker/[email protected]
id: meta
with:
Expand All @@ -29,24 +26,17 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Build image
id: build
uses: redhat-actions/buildah-build@v2
with:
layers: true
containerfiles: |
./Dockerfile
image: jail
tags: ${{ steps.meta.outputs.tags }}

- name: Push to ghcr
if: ${{ github.event_name == 'push' }}
uses: redhat-actions/push-to-registry@v2
id: push
- uses: docker/[email protected]
if: github.event_name != 'pull_request'
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/[email protected]
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
provenance: false
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 4c0867b

Please sign in to comment.