Test 22
All checks were successful
Build Docker Image / Build ARM64 (3.10) (push) Successful in 1m26s
Build Docker Image / Build AMD64 (3.10) (push) Successful in 8m55s
Build Docker Image / Create Multi-arch Manifest (3.10) (push) Successful in 10s

This commit is contained in:
2024-12-10 23:37:30 +02:00
parent 6cfc2d11f6
commit 5e1e36e783

View File

@@ -36,6 +36,10 @@ jobs:
registry: gitea.technocloud.ee registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push AMD64 - name: Build and Push AMD64
id: build-docker id: build-docker
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
@@ -45,7 +49,7 @@ jobs:
platforms: linux/amd64 platforms: linux/amd64
push: true push: true
provenance: false provenance: false
outputs: type=image,name=gitea.technocloud.ee/${GITHUB_REPOSITORY},push-by-digest=true outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
- name: Summarize the Docker digest - name: Summarize the Docker digest
id: digest id: digest
run: | run: |
@@ -84,6 +88,10 @@ jobs:
registry: gitea.technocloud.ee registry: gitea.technocloud.ee
username: ${{ secrets.DOCKER_USERNAME }} username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }} password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
- name: Build and Push ARM64 - name: Build and Push ARM64
id: build-docker id: build-docker
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -93,7 +101,7 @@ jobs:
platforms: linux/arm64 platforms: linux/arm64
push: true push: true
provenance: false provenance: false
outputs: type=image,name=gitea.technocloud.ee/${GITHUB_REPOSITORY},push-by-digest=true outputs: type=image,name=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
- name: Summarize the Docker digest - name: Summarize the Docker digest
id: digest id: digest
run: | run: |
@@ -107,8 +115,6 @@ jobs:
needs: [build-arm64, build-amd64] needs: [build-arm64, build-amd64]
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Create Multi-arch Manifest name: Create Multi-arch Manifest
env:
DOCKER_ORG: technocloud-public
strategy: strategy:
matrix: matrix:
python-version: ['3.10'] python-version: ['3.10']
@@ -128,6 +134,7 @@ jobs:
- name: Get Repository Metadata - name: Get Repository Metadata
id: meta id: meta
run: | run: |
echo "REPO_NAME=${GITHUB_REPOSITORY}" >> $GITHUB_OUTPUT
echo "PY_VERSION=digest-$(echo ${{ matrix.python-version }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT echo "PY_VERSION=digest-$(echo ${{ matrix.python-version }} | sed 's/\./-/g')" >> $GITHUB_OUTPUT
- name: Create and Push Multi-arch Manifest - name: Create and Push Multi-arch Manifest
@@ -138,6 +145,6 @@ jobs:
AMD_DIGEST=${{ needs.build-amd64.outputs[steps.meta.outputs.PY_VERSION] }} AMD_DIGEST=${{ needs.build-amd64.outputs[steps.meta.outputs.PY_VERSION] }}
echo $ARM_DIGEST echo $ARM_DIGEST
echo $AMD_DIGEST echo $AMD_DIGEST
IMAGE_NAME=gitea.technocloud.ee/${GITHUB_REPOSITORY}:python${{ matrix.python-version }} IMAGE_NAME=gitea.technocloud.ee/${{ steps.meta.outputs.REPO_NAME }}:python${{ matrix.python-version }}
docker manifest create $IMAGE_NAME --amend gitea.technocloud.ee/technocloud-public/nginx-unit@${ARM_DIGEST} --amend gitea.technocloud.ee/technocloud-public/nginx-unit@${AMD_DIGEST} docker manifest create $IMAGE_NAME --amend gitea.technocloud.ee/technocloud-public/nginx-unit@${ARM_DIGEST} --amend gitea.technocloud.ee/technocloud-public/nginx-unit@${AMD_DIGEST}
docker manifest push $IMAGE_NAME docker manifest push $IMAGE_NAME