Test building by digest #4
This commit is contained in:
@@ -92,43 +92,43 @@ jobs:
|
|||||||
provenance: false
|
provenance: false
|
||||||
outputs: type=image,name=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
|
outputs: type=image,name=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
|
||||||
|
|
||||||
create-manifest:
|
create-manifest:
|
||||||
needs: [build-amd64, build-arm64]
|
needs: [build-amd64, build-arm64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Create Multi-arch Manifest
|
name: Create Multi-arch Manifest
|
||||||
env:
|
env:
|
||||||
DOCKER_ORG: technocloud-public
|
DOCKER_ORG: technocloud-public
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.10']
|
python-version: ['3.10']
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
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: Set up Docker BuildX
|
- name: Set up Docker BuildX
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
driver: docker-container
|
driver: docker-container
|
||||||
|
|
||||||
- name: Get Repository Metadata
|
- name: Get Repository Metadata
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
|
echo "REPO_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create and Push Multi-arch Manifest
|
- name: Create and Push Multi-arch Manifest
|
||||||
run: |
|
run: |
|
||||||
IMAGE_NAME=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:python${{ matrix.python-version }}
|
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] }}
|
AMD64_DIGEST=${{ needs.build-amd64.outputs['amd64-digest-' + matrix.python-version] }}
|
||||||
ARM64_DIGEST=${{ needs.build-arm64.outputs['arm64-digest-' + matrix.python-version] }}
|
ARM64_DIGEST=${{ needs.build-arm64.outputs['arm64-digest-' + matrix.python-version] }}
|
||||||
|
|
||||||
# Create the manifest
|
# Create the manifest
|
||||||
docker manifest create $IMAGE_NAME \
|
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 }}@$AMD64_DIGEST \
|
||||||
--amend gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}@$ARM64_DIGEST
|
--amend gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}@$ARM64_DIGEST
|
||||||
|
|
||||||
# Push the manifest
|
# Push the manifest
|
||||||
docker manifest push $IMAGE_NAME
|
docker manifest push $IMAGE_NAME
|
||||||
Reference in New Issue
Block a user