fix: label versions with arch
This commit is contained in:
parent
0cfe6502fe
commit
cb464d30d0
2 changed files with 20 additions and 10 deletions
|
|
@ -18,6 +18,7 @@ on:
|
||||||
env:
|
env:
|
||||||
REGISTRY: bitfreedom.net
|
REGISTRY: bitfreedom.net
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
CACHE_IMAGE: ${{ github.repository }}-buildcache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -34,8 +35,10 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- platform: linux/amd64
|
- platform: linux/amd64
|
||||||
runner: docker-amd64
|
runner: docker-amd64
|
||||||
|
arch: amd64
|
||||||
- platform: linux/arm64
|
- platform: linux/arm64
|
||||||
runner: docker-arm64
|
runner: docker-arm64
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Docker
|
- name: Install Docker
|
||||||
|
|
@ -83,9 +86,11 @@ jobs:
|
||||||
provenance: false
|
provenance: false
|
||||||
build-args: |
|
build-args: |
|
||||||
SEMANTIC_CACHE=true
|
SEMANTIC_CACHE=true
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-semantic-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
|
tags: |
|
||||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-semantic-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:semantic-${{ matrix.arch }}
|
||||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-semantic-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }},mode=min
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:run-${{ github.run_id }}-semantic-${{ matrix.arch }}
|
||||||
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:semantic-${{ matrix.arch }}
|
||||||
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:semantic-${{ matrix.arch }},mode=min
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
runs-on: docker-amd64
|
runs-on: docker-amd64
|
||||||
|
|
@ -139,5 +144,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-semantic-amd64 \
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:run-${{ github.run_id }}-semantic-amd64 \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-semantic-arm64
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:run-${{ github.run_id }}-semantic-arm64
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ on:
|
||||||
env:
|
env:
|
||||||
REGISTRY: bitfreedom.net
|
REGISTRY: bitfreedom.net
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
CACHE_IMAGE: ${{ github.repository }}-buildcache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -27,8 +28,10 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- platform: linux/amd64
|
- platform: linux/amd64
|
||||||
runner: docker-amd64
|
runner: docker-amd64
|
||||||
|
arch: amd64
|
||||||
- platform: linux/arm64
|
- platform: linux/arm64
|
||||||
runner: docker-arm64
|
runner: docker-arm64
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Docker
|
- name: Install Docker
|
||||||
|
|
@ -74,9 +77,11 @@ jobs:
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
push: true
|
push: true
|
||||||
provenance: false
|
provenance: false
|
||||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
|
tags: |
|
||||||
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:${{ matrix.arch }}
|
||||||
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }},mode=min
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:run-${{ github.run_id }}-${{ matrix.arch }}
|
||||||
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:${{ matrix.arch }}
|
||||||
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:${{ matrix.arch }},mode=min
|
||||||
|
|
||||||
merge:
|
merge:
|
||||||
runs-on: docker-amd64
|
runs-on: docker-amd64
|
||||||
|
|
@ -130,5 +135,5 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-amd64 \
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:run-${{ github.run_id }}-amd64 \
|
||||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache-arm64
|
${{ env.REGISTRY }}/${{ env.CACHE_IMAGE }}:run-${{ github.run_id }}-arm64
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue