mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
feat: try matrix docker action
This commit is contained in:
parent
6b8b29ed29
commit
e07d02f39d
1 changed files with 12 additions and 36 deletions
48
.github/workflows/docker.yml
vendored
48
.github/workflows/docker.yml
vendored
|
@ -6,9 +6,14 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
push-amd64:
|
||||
name: 'push (amd64)'
|
||||
runs-on: ubuntu-24.04
|
||||
push:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-24.04, ubuntu-24.04-arm]
|
||||
arch: [amd64, arm64]
|
||||
|
||||
name: push
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
@ -27,46 +32,17 @@ jobs:
|
|||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/amd64
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
tags: |
|
||||
ghcr.io/diced/zipline:v4-amd64
|
||||
ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-amd64
|
||||
|
||||
push-arm64:
|
||||
name: 'push (arm64)'
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get commit sha
|
||||
id: sha
|
||||
run: |
|
||||
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
platforms: linux/arm64
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
provenance: false
|
||||
tags: |
|
||||
ghcr.io/diced/zipline:v4-arm64
|
||||
ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-arm64
|
||||
ghcr.io/diced/zipline:v4-${{ matrix.arch }}
|
||||
ghcr.io/diced/zipline:v4-${{ steps.sha.outputs.short_sha }}-${{ matrix.arch }}
|
||||
|
||||
ammend-builds:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [push-amd64, push-arm64]
|
||||
needs: push
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Get commit sha
|
||||
|
|
Loading…
Add table
Reference in a new issue