removed workflow step for publishing python 3.8 images #64
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docker Publish | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| PYTHON: | ||
| description: FULL Version Number of Python | ||
| required: true | ||
| GHCLI: | ||
| description: Version of GitHub CLI | ||
| required: true | ||
| jobs: | ||
| build-push: | ||
| needs: python-3-12 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| - name: Prepare | ||
| id: prep | ||
| run: | | ||
| PYTHON_VERSION=${{ github.event.inputs.PYTHON }} | ||
| PYTHON_MINOR=${PYTHON_VERSION%.*} | ||
| DOCKERHUB_IMAGE=cicirello/pyaction | ||
| GHCR_IMAGE=ghcr.io/cicirello/pyaction | ||
| VERSION=${{ github.event.inputs.GHCLI }} | ||
| MINOR=${VERSION%.*} | ||
| MAJOR=${VERSION%%.*} | ||
| TAGS="${DOCKERHUB_IMAGE}:${PYTHON_MINOR}-gh-${MAJOR},${DOCKERHUB_IMAGE}:${PYTHON_MINOR}-gh-${MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_MINOR}-gh-${VERSION}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:latest" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_MINOR}-gh-${MAJOR},${GHCR_IMAGE}:${PYTHON_MINOR}-gh-${MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_MINOR}-gh-${VERSION}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:latest" | ||
| echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
| echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT | ||
| echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: all | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Login to Github Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| builder: ${{ steps.buildx.outputs.name }} | ||
| context: . | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 | ||
| push: true | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} | ||
| python-3-12: | ||
| needs: python-3-11 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: "3.12" | ||
| - name: Prepare | ||
| id: prep | ||
| run: | | ||
| PYTHON_VERSION=3.12 | ||
| DOCKERHUB_IMAGE=cicirello/pyaction | ||
| GHCR_IMAGE=ghcr.io/cicirello/pyaction | ||
| VERSION=${{ github.event.inputs.GHCLI }} | ||
| MINOR=${VERSION%.*} | ||
| MAJOR=${VERSION%%.*} | ||
| TAGS="${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
| echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT | ||
| echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: all | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Login to Github Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| builder: ${{ steps.buildx.outputs.name }} | ||
| context: . | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 | ||
| push: true | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} | ||
| python-3-11: | ||
| needs: python-3-10 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: "3.11" | ||
| - name: Prepare | ||
| id: prep | ||
| run: | | ||
| PYTHON_VERSION=3.11 | ||
| DOCKERHUB_IMAGE=cicirello/pyaction | ||
| GHCR_IMAGE=ghcr.io/cicirello/pyaction | ||
| VERSION=${{ github.event.inputs.GHCLI }} | ||
| MINOR=${VERSION%.*} | ||
| MAJOR=${VERSION%%.*} | ||
| TAGS="${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
| echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT | ||
| echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: all | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Login to Github Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| builder: ${{ steps.buildx.outputs.name }} | ||
| context: . | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 | ||
| push: true | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} | ||
| python-3-10: | ||
| needs: python-3-9 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: "3.10" | ||
| - name: Prepare | ||
| id: prep | ||
| run: | | ||
| PYTHON_VERSION=3.10 | ||
| DOCKERHUB_IMAGE=cicirello/pyaction | ||
| GHCR_IMAGE=ghcr.io/cicirello/pyaction | ||
| VERSION=${{ github.event.inputs.GHCLI }} | ||
| MINOR=${VERSION%.*} | ||
| MAJOR=${VERSION%%.*} | ||
| TAGS="${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
| echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT | ||
| echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: all | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Login to Github Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| builder: ${{ steps.buildx.outputs.name }} | ||
| context: . | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 | ||
| push: true | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} | ||
| python-3-9: | ||
| needs: python-3-8 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: "3.9" | ||
| - name: Prepare | ||
| id: prep | ||
| run: | | ||
| PYTHON_VERSION=3.9 | ||
| DOCKERHUB_IMAGE=cicirello/pyaction | ||
| GHCR_IMAGE=ghcr.io/cicirello/pyaction | ||
| VERSION=${{ github.event.inputs.GHCLI }} | ||
| MINOR=${VERSION%.*} | ||
| MAJOR=${VERSION%%.*} | ||
| TAGS="${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" | ||
| TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" | ||
| echo "tags=${TAGS}" >> $GITHUB_OUTPUT | ||
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
| echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT | ||
| echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT | ||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v3 | ||
| with: | ||
| platforms: all | ||
| - name: Set up Docker Buildx | ||
| id: buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
| - name: Login to DockerHub | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Login to Github Container Registry | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| builder: ${{ steps.buildx.outputs.name }} | ||
| context: . | ||
| file: ./Dockerfile | ||
| platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 | ||
| push: true | ||
| tags: ${{ steps.prep.outputs.tags }} | ||
| labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} | ||