From 17ef1f58d77450611a228200a0c253d2c91a8e41 Mon Sep 17 00:00:00 2001 From: "Paul C. Martin" Date: Fri, 1 Nov 2024 13:39:45 -0400 Subject: [PATCH] Update latest workflows --- .../{latest.yaml => python3.11-latest.yaml} | 46 +--------- .github/workflows/python3.12-latest.yaml | 88 +++++++++++++++++++ .github/workflows/python3.13-latest.yaml | 88 +++++++++++++++++++ 3 files changed, 179 insertions(+), 43 deletions(-) rename .github/workflows/{latest.yaml => python3.11-latest.yaml} (85%) create mode 100644 .github/workflows/python3.12-latest.yaml create mode 100644 .github/workflows/python3.13-latest.yaml diff --git a/.github/workflows/latest.yaml b/.github/workflows/python3.11-latest.yaml similarity index 85% rename from .github/workflows/latest.yaml rename to .github/workflows/python3.11-latest.yaml index 865e637..b0708ea 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/python3.11-latest.yaml @@ -1,5 +1,5 @@ -name: Latest Release -run-name: "Latest Release (branch: ${{ github.ref_name }})" +name: Latest Python 3.11 Release +run-name: "Latest Python 3.11 Release (branch: ${{ github.ref_name }})" on: push: @@ -9,47 +9,6 @@ on: jobs: - build-python3-12-3007: - runs-on: ubuntu-22.04 - env: - DOCKER_USERNAME: pcm0 - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - ACR_URL: ${{ secrets.ACR_URL }} - ACR_USERNAME: ${{ secrets.ACR_USERNAME }} - ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }} - steps: - - uses: actions/checkout@v3 - - name: Get Build Version - run: | - echo "BUILD=${GITHUB_REF:10}" | tee -a $GITHUB_ENV - echo "SHORT_SHA=${GITHUB_SHA:0:7}" | tee -a $GITHUB_ENV - - name: Python 3.12 - continue-on-error: true - run: | - podman pull python:3.12-alpine - podman build -f Python-3.12-alpine.dockerfile --build-arg FLAGS='--no-deps' --build-arg REQUIREMENTS=requirements-3007.txt . \ - -t docker.io/pcm0/salt:3.12-latest-alpine \ - -t docker.io/pcm0/salt:3.12-${{ env.BUILD }}-alpine \ - -t docker.io/pcm0/salt:3.12-latest \ - -t docker.io/pcm0/salt:3.12-${{ env.BUILD }} \ - -t docker.io/pcm0/salt:3.12-${{ env.SHORT_SHA }}-alpine \ - -t $ACR_URL/pmartin47/salt:3.12-latest-alpine \ - -t $ACR_URL/pmartin47/salt:3.12-${{ env.BUILD }}-alpine \ - -t $ACR_URL/pmartin47/salt:3.12-latest \ - -t $ACR_URL/pmartin47/salt:3.12-${{ env.BUILD }} \ - -t $ACR_URL/pmartin47/salt:3.12-${{ env.SHORT_SHA }}-alpine - - name: Push to Docker Hub - run: | - podman login docker.io --username $DOCKER_USERNAME --password $DOCKER_PASSWORD - podman images | awk "/docker.io\/pcm0\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} - podman logout - podman login $ACR_URL --username $ACR_USERNAME --password $ACR_PASSWORD - podman images | awk "/$ACR_URL\/pmartin47\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} - - - name: Docker System Prune - run: | - podman system prune --force --all - build-python3-12-3007-isalt: runs-on: ubuntu-latest env: DOCKER_USERNAME: pcm0 @@ -147,6 +106,7 @@ jobs: - name: Docker System Prune run: | podman system prune --force --all + build-python3-11-3007-isalt: runs-on: ubuntu-latest env: diff --git a/.github/workflows/python3.12-latest.yaml b/.github/workflows/python3.12-latest.yaml new file mode 100644 index 0000000..6b06da5 --- /dev/null +++ b/.github/workflows/python3.12-latest.yaml @@ -0,0 +1,88 @@ +name: Latest Python 3.12 Release +run-name: "Latest Python 3.12 Release (branch: ${{ github.ref_name }})" + +on: + push: + # Pattern matched against refs/tags + tags: + - '[0-9]+.[0-9]+-[0-9]+' + +jobs: + + build-python3-12-3007: + runs-on: ubuntu-22.04 + env: + DOCKER_USERNAME: pcm0 + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + ACR_URL: ${{ secrets.ACR_URL }} + ACR_USERNAME: ${{ secrets.ACR_USERNAME }} + ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }} + steps: + - uses: actions/checkout@v3 + - name: Get Build Version + run: | + echo "BUILD=${GITHUB_REF:10}" | tee -a $GITHUB_ENV + echo "SHORT_SHA=${GITHUB_SHA:0:7}" | tee -a $GITHUB_ENV + - name: Python 3.12 + continue-on-error: true + run: | + podman pull python:3.12-alpine + podman build -f Python-3.12-alpine.dockerfile --build-arg FLAGS='--no-deps' --build-arg REQUIREMENTS=requirements-3007.txt . \ + -t docker.io/pcm0/salt:3.12-latest-alpine \ + -t docker.io/pcm0/salt:3.12-${{ env.BUILD }}-alpine \ + -t docker.io/pcm0/salt:3.12-latest \ + -t docker.io/pcm0/salt:3.12-${{ env.BUILD }} \ + -t docker.io/pcm0/salt:3.12-${{ env.SHORT_SHA }}-alpine \ + -t $ACR_URL/pmartin47/salt:3.12-latest-alpine \ + -t $ACR_URL/pmartin47/salt:3.12-${{ env.BUILD }}-alpine \ + -t $ACR_URL/pmartin47/salt:3.12-latest \ + -t $ACR_URL/pmartin47/salt:3.12-${{ env.BUILD }} \ + -t $ACR_URL/pmartin47/salt:3.12-${{ env.SHORT_SHA }}-alpine + - name: Push to Docker Hub + run: | + podman login docker.io --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + podman images | awk "/docker.io\/pcm0\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} + podman logout + podman login $ACR_URL --username $ACR_USERNAME --password $ACR_PASSWORD + podman images | awk "/$ACR_URL\/pmartin47\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} + + - name: Docker System Prune + run: | + podman system prune --force --all + + build-python3-12-3007-isalt: + runs-on: ubuntu-latest + env: + DOCKER_USERNAME: pcm0 + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + ACR_URL: ${{ secrets.ACR_URL }} + ACR_USERNAME: ${{ secrets.ACR_USERNAME }} + ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }} + steps: + - uses: actions/checkout@v3 + - name: Get Build Version + run: | + echo "BUILD=${GITHUB_REF:10}" | tee -a $GITHUB_ENV + echo "SHORT_SHA=${GITHUB_SHA:0:7}" | tee -a $GITHUB_ENV + - name: Python 3.12 + continue-on-error: true + run: | + podman pull python:3.12-alpine + podman build -f Python-3.12-alpine.dockerfile --build-arg FLAGS='--no-deps' --build-arg REQUIREMENTS=requirements-3007-isalt.txt . \ + -t docker.io/pcm0/salt:3.12-latest-isalt-alpine \ + -t docker.io/pcm0/salt:3.12-${{ env.BUILD }}-isalt-alpine \ + -t docker.io/pcm0/salt:3.12-latest-isalt \ + -t docker.io/pcm0/salt:3.12-${{ env.BUILD }}-isalt \ + -t docker.io/pcm0/salt:3.12-${{ env.SHORT_SHA }}-isalt-alpine \ + -t $ACR_URL/pmartin47/salt:3.12-latest-isalt-alpine \ + -t $ACR_URL/pmartin47/salt:3.12-${{ env.BUILD }}-isalt-alpine \ + -t $ACR_URL/pmartin47/salt:3.12-latest-isalt \ + -t $ACR_URL/pmartin47/salt:3.12-${{ env.BUILD }}-isalt \ + -t $ACR_URL/pmartin47/salt:3.12-${{ env.SHORT_SHA }}-isalt-alpine + - name: Push to Docker Hub + run: | + podman login docker.io --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + podman images | awk "/docker.io\/pcm0\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} + podman logout + podman login $ACR_URL --username $ACR_USERNAME --password $ACR_PASSWORD + podman images | awk "/$ACR_URL\/pmartin47\/salt/&&/${{ env.SHORT_BUILDSHA }}/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} diff --git a/.github/workflows/python3.13-latest.yaml b/.github/workflows/python3.13-latest.yaml new file mode 100644 index 0000000..8bdd557 --- /dev/null +++ b/.github/workflows/python3.13-latest.yaml @@ -0,0 +1,88 @@ +name: Latest Python 3.13 Release +run-name: "Latest Python 3.13 Release (branch: ${{ github.ref_name }})" + +on: + push: + # Pattern matched against refs/tags + tags: + - '[0-9]+.[0-9]+-[0-9]+' + +jobs: + + build-python3-13-3007: + runs-on: ubuntu-22.04 + env: + DOCKER_USERNAME: pcm0 + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + ACR_URL: ${{ secrets.ACR_URL }} + ACR_USERNAME: ${{ secrets.ACR_USERNAME }} + ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }} + steps: + - uses: actions/checkout@v3 + - name: Get Build Version + run: | + echo "BUILD=${GITHUB_REF:10}" | tee -a $GITHUB_ENV + echo "SHORT_SHA=${GITHUB_SHA:0:7}" | tee -a $GITHUB_ENV + - name: Python 3.13 + continue-on-error: true + run: | + podman pull python:3.13-alpine + podman build -f Python-3.13-alpine.dockerfile --build-arg FLAGS='--no-deps' --build-arg REQUIREMENTS=requirements-3007.txt . \ + -t docker.io/pcm0/salt:3.13-latest-alpine \ + -t docker.io/pcm0/salt:3.13-${{ env.BUILD }}-alpine \ + -t docker.io/pcm0/salt:3.13-latest \ + -t docker.io/pcm0/salt:3.13-${{ env.BUILD }} \ + -t docker.io/pcm0/salt:3.13-${{ env.SHORT_SHA }}-alpine \ + -t $ACR_URL/pmartin47/salt:3.13-latest-alpine \ + -t $ACR_URL/pmartin47/salt:3.13-${{ env.BUILD }}-alpine \ + -t $ACR_URL/pmartin47/salt:3.13-latest \ + -t $ACR_URL/pmartin47/salt:3.13-${{ env.BUILD }} \ + -t $ACR_URL/pmartin47/salt:3.13-${{ env.SHORT_SHA }}-alpine + - name: Push to Docker Hub + run: | + podman login docker.io --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + podman images | awk "/docker.io\/pcm0\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} + podman logout + podman login $ACR_URL --username $ACR_USERNAME --password $ACR_PASSWORD + podman images | awk "/$ACR_URL\/pmartin47\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} + + - name: Docker System Prune + run: | + podman system prune --force --all + + build-python3-13-3007-isalt: + runs-on: ubuntu-latest + env: + DOCKER_USERNAME: pcm0 + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + ACR_URL: ${{ secrets.ACR_URL }} + ACR_USERNAME: ${{ secrets.ACR_USERNAME }} + ACR_PASSWORD: ${{ secrets.ACR_PASSWORD }} + steps: + - uses: actions/checkout@v3 + - name: Get Build Version + run: | + echo "BUILD=${GITHUB_REF:10}" | tee -a $GITHUB_ENV + echo "SHORT_SHA=${GITHUB_SHA:0:7}" | tee -a $GITHUB_ENV + - name: Python 3.13 + continue-on-error: true + run: | + podman pull python:3.13-alpine + podman build -f Python-3.13-alpine.dockerfile --build-arg FLAGS='--no-deps' --build-arg REQUIREMENTS=requirements-3007-isalt.txt . \ + -t docker.io/pcm0/salt:3.13-latest-isalt-alpine \ + -t docker.io/pcm0/salt:3.13-${{ env.BUILD }}-isalt-alpine \ + -t docker.io/pcm0/salt:3.13-latest-isalt \ + -t docker.io/pcm0/salt:3.13-${{ env.BUILD }}-isalt \ + -t docker.io/pcm0/salt:3.13-${{ env.SHORT_SHA }}-isalt-alpine \ + -t $ACR_URL/pmartin47/salt:3.13-latest-isalt-alpine \ + -t $ACR_URL/pmartin47/salt:3.13-${{ env.BUILD }}-isalt-alpine \ + -t $ACR_URL/pmartin47/salt:3.13-latest-isalt \ + -t $ACR_URL/pmartin47/salt:3.13-${{ env.BUILD }}-isalt \ + -t $ACR_URL/pmartin47/salt:3.13-${{ env.SHORT_SHA }}-isalt-alpine + - name: Push to Docker Hub + run: | + podman login docker.io --username $DOCKER_USERNAME --password $DOCKER_PASSWORD + podman images | awk "/docker.io\/pcm0\/salt/ { print \$1\":\"\$2 }" | xargs -I {} podman push {} + podman logout + podman login $ACR_URL --username $ACR_USERNAME --password $ACR_PASSWORD + podman images | awk "/$ACR_URL\/pmartin47\/salt/&&/${{ env.SHORT_BUILDSHA }}/ { print \$1\":\"\$2 }" | xargs -I {} podman push {}