Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 16 additions & 25 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,23 @@ on:
tags:
- '*'
pull_request:
branches:
- 'master'

jobs:
build:
uses: crazy-max/.github/.github/workflows/bake-distribute-mp.yml@0acc187b016a2946786f201397bbcfb2c530ffc7
uses: docker/github-builder-experimental/.github/workflows/bake.yml@af87571fd3347a8a760e6053efba57325c00b74b
permissions:
# same as global permissions
contents: read
# required to push to GHCR
packages: write
strategy:
fail-fast: false
matrix:
include:
-
image: crazymax/7zip
login-registry: docker.io
login-username: crazymax
login-secret-key: DOCKER_PASSWORD
-
image: ghcr.io/crazy-max/7zip
login-registry: ghcr.io
login-username: ${{ github.repository_owner }}
login-secret-key: GITHUB_TOKEN
contents: read # same as global permissions
id-token: write # for signing attestation(s) with GitHub OIDC Token
packages: write # required to push to GHCR
with:
setup-qemu: true
target: image-all
output: image
push: ${{ github.event_name != 'pull_request' }}
set-meta-labels: true
meta-image: ${{ matrix.image }}
meta-images: |
crazymax/7zip
ghcr.io/crazy-max/7zip
meta-tags: |
type=match,pattern=(.*)-r,group=1
type=ref,event=pr
Expand All @@ -53,7 +40,11 @@ jobs:
org.opencontainers.image.title=7-Zip
org.opencontainers.image.description=File archiver with a high compression ratio
org.opencontainers.image.vendor=CrazyMax
login-registry: ${{ matrix.login-registry }}
login-username: ${{ matrix.login-username }}
secrets:
login-password: ${{ secrets[matrix.login-secret-key] }}
registry-auths: |
- registry: docker.io
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
26 changes: 25 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,30 @@ on:
pull_request:

jobs:
smoke:
prepare-smoke:
runs-on: ubuntu-latest
outputs:
includes: ${{ steps.smoke.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Smoke test matrix
id: smoke
uses: docker/bake-action/subaction/matrix@v6
with:
target: smoke-test
fields: platforms

smoke:
runs-on: ${{ startsWith(matrix.platforms, 'linux/arm') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
needs:
- prepare-smoke
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.prepare-smoke.outputs.includes) }}
steps:
-
name: Set up QEMU
Expand All @@ -29,3 +51,5 @@ jobs:
uses: docker/bake-action@v6
with:
targets: smoke-test
set: |
*.platform=${{ matrix.platforms }}