Test 13
This commit is contained in:
@@ -6,48 +6,57 @@ 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:
|
||||||
# amd64-digest-${{ matrix.python-version }}: ${{ steps.build.outputs.digest }}
|
digest-3-10: ${{ steps.digest.outputs.3_10_DIGEST }}
|
||||||
# steps:
|
digest-3-11: ${{ steps.digest.outputs.3_11_DIGEST }}
|
||||||
# - name: Checkout
|
digest-3-12: ${{ steps.digest.outputs.3_12_DIGEST }}
|
||||||
# uses: actions/checkout@v4
|
digest-3-13: ${{ steps.digest.outputs.3_13_DIGEST }}
|
||||||
# with:
|
steps:
|
||||||
# github-server-url: https://gitea.technocloud.ee
|
- name: Checkout
|
||||||
# - name: Set up Docker BuildX
|
uses: actions/checkout@v4
|
||||||
# uses: docker/setup-buildx-action@v3
|
with:
|
||||||
# with:
|
github-server-url: https://gitea.technocloud.ee
|
||||||
# platforms: linux/amd64
|
- name: Set up Docker BuildX
|
||||||
# - name: Login to DockerHub
|
uses: docker/setup-buildx-action@v3
|
||||||
# uses: docker/login-action@v3
|
with:
|
||||||
# with:
|
platforms: linux/amd64
|
||||||
# registry: gitea.technocloud.ee
|
- name: Login to DockerHub
|
||||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
uses: docker/login-action@v3
|
||||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
with:
|
||||||
# - name: Get Meta
|
registry: gitea.technocloud.ee
|
||||||
# id: meta
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
# run: |
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
# echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
- name: Get Meta
|
||||||
# - name: Build and Push AMD64
|
id: meta
|
||||||
# id: build
|
run: |
|
||||||
# uses: docker/build-push-action@v5
|
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
|
||||||
# with:
|
- name: Build and Push AMD64
|
||||||
# context: .
|
id: build
|
||||||
# file: Dockerfile.python${{ matrix.python-version }}
|
uses: docker/build-push-action@v5
|
||||||
# platforms: linux/amd64
|
with:
|
||||||
# push: true
|
context: .
|
||||||
# provenance: false
|
file: Dockerfile.python${{ matrix.python-version }}
|
||||||
# outputs: type=image,name=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
|
platforms: linux/amd64
|
||||||
|
push: true
|
||||||
|
provenance: false
|
||||||
|
outputs: type=image,name=gitea.technocloud.ee/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }},push-by-digest=true
|
||||||
|
- name: Summarize the Docker digest
|
||||||
|
id: digest
|
||||||
|
run: |
|
||||||
|
PY_VERSION=${{ matrix.python-version }}
|
||||||
|
PY_VERSION_MOD=$(echo $PY_VERSION | sed 's/\./_/g')
|
||||||
|
echo ${PY_VERSION_MOD}_DIGEST="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
build-arm64:
|
build-arm64:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -61,10 +70,10 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
python-version: ['3.10']
|
python-version: ['3.10']
|
||||||
outputs:
|
outputs:
|
||||||
arm64-digest-3-10: ${{ steps.digest.outputs.ARM_3_10_DIGEST }}
|
digest-3-10: ${{ steps.digest.outputs.3_10_DIGEST }}
|
||||||
arm64-digest-3-11: ${{ steps.digest.outputs.ARM_3_11_DIGEST }}
|
digest-3-11: ${{ steps.digest.outputs.3_11_DIGEST }}
|
||||||
arm64-digest-3-12: ${{ steps.digest.outputs.ARM_3_12_DIGEST }}
|
digest-3-12: ${{ steps.digest.outputs.3_12_DIGEST }}
|
||||||
arm64-digest-3-13: ${{ steps.digest.outputs.ARM_3_13_DIGEST }}
|
digest-3-13: ${{ steps.digest.outputs.3_13_DIGEST }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -97,10 +106,9 @@ jobs:
|
|||||||
- name: Summarize the Docker digest
|
- name: Summarize the Docker digest
|
||||||
id: digest
|
id: digest
|
||||||
run: |
|
run: |
|
||||||
echo 'Digest: ${{ steps.build-docker.outputs.digest }}'
|
|
||||||
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 ARM_${PY_VERSION_MOD}_DIGEST="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
|
echo ${PY_VERSION_MOD}_DIGEST="${{ steps.build-docker.outputs.digest }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
|
||||||
create-manifest:
|
create-manifest:
|
||||||
@@ -132,15 +140,13 @@ jobs:
|
|||||||
|
|
||||||
- name: Create and Push Multi-arch Manifest
|
- name: Create and Push Multi-arch Manifest
|
||||||
run: |
|
run: |
|
||||||
echo "LOL Privet from nginx unit"
|
|
||||||
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 $PY_VERSION_MOD
|
echo "Digest 3UUUU: ${{ needs.build-arm64.outputs['digest-${PY_VERSION_MOD}'] }}"
|
||||||
echo 'Digest 3UUUU: ${{ needs.build-arm64.outputs.arm64-digest-3-10 }}'
|
|
||||||
echo '${{ toJSON(needs.build-arm64.outputs) }}'
|
echo '${{ toJSON(needs.build-arm64.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 }}
|
||||||
echo $IMAGE_NAME
|
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}
|
||||||
echo ${{ steps.meta.outputs }}
|
|
||||||
docker manifest create $IMAGE_NAME --amend gitea.technocloud.ee/technocloud-public/nginx-unit@sha256:3aabfbb49990a4f44a1b2a9c34c3a68b503b46fb5fdf30a8d520bc9c2a7e3558
|
|
||||||
echo "Vse rabotaet?"
|
|
||||||
docker manifest push $IMAGE_NAME
|
docker manifest push $IMAGE_NAME
|
||||||
Reference in New Issue
Block a user