mirror of
https://github.com/int128/kubelogin.git
synced 2026-05-20 06:42:45 +00:00
Build multi-architecture image in parallel (#833)
* Build multi platforms in parallel * Fix suffix * docker pull * Push [DO NOT MERGE] * Add linux prefix * Use int128/docker-manifest-create-action * Fix latest * Remove push
This commit is contained in:
50
.github/workflows/docker.yaml
vendored
50
.github/workflows/docker.yaml
vendored
@@ -25,21 +25,30 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- linux/ppc64le
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: docker/metadata-action@v4
|
||||
id: metadata
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
- uses: int128/docker-build-cache-config-action@v1
|
||||
id: cache
|
||||
with:
|
||||
image: ghcr.io/${{ github.repository }}/cache
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/metadata-action@v4
|
||||
id: metadata
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
flavor: suffix=-${{ matrix.platform }}
|
||||
- uses: int128/docker-build-cache-config-action@v1
|
||||
id: cache
|
||||
with:
|
||||
image: ghcr.io/${{ github.repository }}/cache
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
- uses: docker/build-push-action@v3
|
||||
@@ -49,4 +58,27 @@ jobs:
|
||||
labels: ${{ steps.metadata.outputs.labels }}
|
||||
cache-from: ${{ steps.cache.outputs.cache-from }}
|
||||
cache-to: ${{ steps.cache.outputs.cache-to }}
|
||||
platforms: linux/amd64,linux/arm64,linux/ppc64le
|
||||
platforms: ${{ matrix.platform }}
|
||||
|
||||
build-multi-architecture:
|
||||
needs:
|
||||
- build
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: docker/metadata-action@v4
|
||||
id: metadata
|
||||
with:
|
||||
images: ghcr.io/${{ github.repository }}
|
||||
- uses: int128/docker-manifest-create-action@v1
|
||||
with:
|
||||
tags: ${{ steps.metadata.outputs.tags }}
|
||||
suffixes: |
|
||||
-linux-amd64
|
||||
-linux-arm64
|
||||
-linux-ppc64le
|
||||
|
||||
Reference in New Issue
Block a user