Skip to content

Commit

Permalink
Update latest workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulChristophel committed Nov 1, 2024
1 parent 8cd829c commit 17ef1f5
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/python3.12-latest.yaml
Original file line number Diff line number Diff line change
@@ -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 {}
88 changes: 88 additions & 0 deletions .github/workflows/python3.13-latest.yaml
Original file line number Diff line number Diff line change
@@ -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 {}

0 comments on commit 17ef1f5

Please sign in to comment.