Test building by digest #3
This commit is contained in:
@@ -94,34 +94,41 @@ jobs:
|
||||
|
||||
create-manifest:
|
||||
needs: [build-amd64, build-arm64]
|
||||
runs-on: linux_amd
|
||||
runs-on: ubuntu-latest
|
||||
name: Create Multi-arch Manifest
|
||||
container:
|
||||
image: catthehacker/ubuntu:act-latest
|
||||
env:
|
||||
DOCKER_ORG: technocloud-public
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ['3.10']
|
||||
steps:
|
||||
- name: Login to DockerHub
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: gitea.technocloud.ee
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
- name: Get Meta
|
||||
|
||||
- name: Set up Docker BuildX
|
||||
uses: docker/setup-buildx-action@v3
|
||||
with:
|
||||
driver: docker-container
|
||||
|
||||
- name: Get Repository Metadata
|
||||
id: meta
|
||||
run: |
|
||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||
- name: Create and Push Manifest
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
provenance: false
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:python${{ matrix.python-version }}
|
||||
inputs: |
|
||||
amd64=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}@${{ needs.build-amd64.outputs.amd64-digest-${{ matrix.python-version }} }}
|
||||
arm64=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}@${{ needs.build-arm64.outputs.arm64-digest-${{ matrix.python-version }} }}
|
||||
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create and Push Multi-arch Manifest
|
||||
run: |
|
||||
IMAGE_NAME=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:python${{ matrix.python-version }}
|
||||
AMD64_DIGEST=${{ needs.build-amd64.outputs['amd64-digest-' + matrix.python-version] }}
|
||||
ARM64_DIGEST=${{ needs.build-arm64.outputs['arm64-digest-' + matrix.python-version] }}
|
||||
|
||||
# Create the manifest
|
||||
docker manifest create $IMAGE_NAME \
|
||||
--amend gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}@$AMD64_DIGEST \
|
||||
--amend gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}@$ARM64_DIGEST
|
||||
|
||||
# Push the manifest
|
||||
docker manifest push $IMAGE_NAME
|
||||
Reference in New Issue
Block a user