Test 16
This commit is contained in:
@@ -6,58 +6,58 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '@monthly'
|
- cron: '@monthly'
|
||||||
jobs:
|
jobs:
|
||||||
build-amd64:
|
# build-amd64:
|
||||||
runs-on: linux_amd
|
# runs-on: linux_amd
|
||||||
name: Build AMD64
|
# name: Build AMD64
|
||||||
container:
|
# container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
# image: catthehacker/ubuntu:act-latest
|
||||||
env:
|
# env:
|
||||||
DOCKER_ORG: technocloud-public
|
# DOCKER_ORG: technocloud-public
|
||||||
RUNNER_TOOL_CACHE: /toolcache
|
# RUNNER_TOOL_CACHE: /toolcache
|
||||||
strategy:
|
# strategy:
|
||||||
matrix:
|
# matrix:
|
||||||
python-version: ['3.10']
|
# python-version: ['3.10']
|
||||||
outputs:
|
# outputs:
|
||||||
digest-3-10: ${{ steps.digest.outputs.DIGEST_3_10 }}
|
# digest-3-10: ${{ steps.digest.outputs.DIGEST_3_10 }}
|
||||||
digest-3-11: ${{ steps.digest.outputs.DIGEST_3_11 }}
|
# digest-3-11: ${{ steps.digest.outputs.DIGEST_3_11 }}
|
||||||
digest-3-12: ${{ steps.digest.outputs.DIGEST_3_12 }}
|
# digest-3-12: ${{ steps.digest.outputs.DIGEST_3_12 }}
|
||||||
digest-3-13: ${{ steps.digest.outputs.DIGEST_3_13 }}
|
# digest-3-13: ${{ steps.digest.outputs.DIGEST_3_13 }}
|
||||||
steps:
|
# steps:
|
||||||
- name: Checkout
|
# - name: Checkout
|
||||||
uses: actions/checkout@v4
|
# uses: actions/checkout@v4
|
||||||
with:
|
# with:
|
||||||
github-server-url: https://gitea.technocloud.ee
|
# github-server-url: https://gitea.technocloud.ee
|
||||||
- name: Set up Docker BuildX
|
# - name: Set up Docker BuildX
|
||||||
uses: docker/setup-buildx-action@v3
|
# uses: docker/setup-buildx-action@v3
|
||||||
with:
|
# with:
|
||||||
platforms: linux/amd64
|
# platforms: linux/amd64
|
||||||
- name: Login to DockerHub
|
# - name: Login to DockerHub
|
||||||
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: Get Meta
|
# - name: Get Meta
|
||||||
id: meta
|
# id: meta
|
||||||
run: |
|
# run: |
|
||||||
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
# echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $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
|
||||||
with:
|
# with:
|
||||||
context: .
|
# context: .
|
||||||
file: Dockerfile.python${{ matrix.python-version }}
|
# file: Dockerfile.python${{ matrix.python-version }}
|
||||||
platforms: linux/amd64
|
# platforms: linux/amd64
|
||||||
push: true
|
# push: true
|
||||||
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
|
||||||
- name: Summarize the Docker digest
|
# - name: Summarize the Docker digest
|
||||||
id: digest
|
# id: digest
|
||||||
run: |
|
# run: |
|
||||||
PY_VERSION=${{ matrix.python-version }}
|
# PY_VERSION=${{ matrix.python-version }}
|
||||||
PY_VERSION_MOD=$(echo $PY_VERSION | sed 's/\./_/g')
|
# PY_VERSION_MOD=$(echo $PY_VERSION | sed 's/\./_/g')
|
||||||
echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}"
|
# echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}"
|
||||||
echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
|
# echo DIGEST_${PY_VERSION_MOD}="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-arm64:
|
build-arm64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -114,7 +114,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
create-manifest:
|
create-manifest:
|
||||||
needs: [build-arm64, build-amd64]
|
needs: [build-arm64]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Create Multi-arch Manifest
|
name: Create Multi-arch Manifest
|
||||||
env:
|
env:
|
||||||
@@ -141,14 +141,14 @@ jobs:
|
|||||||
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
|
||||||
|
env:
|
||||||
|
ARM_DIGEST: ${{ needs.build-arm64.outputs[format('digest-{0}', matrix.python-version | replace('.', '-'))] }}
|
||||||
|
# AMD_DIGEST: ${{ needs.build-amd64.outputs[format('digest-{0}', matrix.python-version | replace('.', '-'))] }}
|
||||||
run: |
|
run: |
|
||||||
PY_VERSION=${{ matrix.python-version }}
|
echo "Digest 3UUUU: $ARM_DIGEST ppp ${ARM_DIGEST}"
|
||||||
PY_VERSION_MOD=$(echo $PY_VERSION | sed 's/\./-/g')
|
|
||||||
echo "Digest 3UUUU: ${{ needs.build-arm64.outputs['digest-${PY_VERSION_MOD}'] }}"
|
|
||||||
echo '${{ toJSON(needs.build-arm64.outputs) }}'
|
echo '${{ toJSON(needs.build-arm64.outputs) }}'
|
||||||
echo '${{ toJSON(needs.build-amd64.outputs) }}'
|
# echo '${{ toJSON(needs.build-amd64.outputs) }}'
|
||||||
ARM_SHA=${{ needs.build-arm64.outputs['digest-${PY_VERSION_MOD}'] }}
|
|
||||||
AMD_SHA=${{ needs.build-amd64.outputs['digest-${PY_VERSION_MOD}'] }}
|
|
||||||
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 }}
|
||||||
docker manifest create $IMAGE_NAME --amend gitea.technocloud.ee/technocloud-public/nginx-unit@${ARM_SHA} --amend gitea.technocloud.ee/technocloud-public/nginx-unit@${AMD_SHA}
|
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
|
||||||
Reference in New Issue
Block a user