|
9 | 9 | GHCLI: |
10 | 10 | description: Version of GitHub CLI |
11 | 11 | required: true |
12 | | - |
13 | 12 |
|
14 | 13 | jobs: |
15 | 14 | build-push: |
16 | | - needs: python-3-12 |
| 15 | + needs: python-3-13 |
17 | 16 | runs-on: ubuntu-latest |
18 | 17 |
|
19 | 18 | steps: |
|
80 | 79 | tags: ${{ steps.prep.outputs.tags }} |
81 | 80 | labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} |
82 | 81 |
|
| 82 | + python-3-13: |
| 83 | + needs: python-3-12 |
| 84 | + runs-on: ubuntu-latest |
| 85 | + |
| 86 | + steps: |
| 87 | + - name: Checkout |
| 88 | + uses: actions/checkout@v5 |
| 89 | + with: |
| 90 | + ref: "3.13" |
| 91 | + |
| 92 | + - name: Prepare |
| 93 | + id: prep |
| 94 | + run: | |
| 95 | + PYTHON_VERSION=3.13 |
| 96 | + DOCKERHUB_IMAGE=cicirello/pyaction |
| 97 | + GHCR_IMAGE=ghcr.io/cicirello/pyaction |
| 98 | + VERSION=${{ github.event.inputs.GHCLI }} |
| 99 | + MINOR=${VERSION%.*} |
| 100 | + MAJOR=${VERSION%%.*} |
| 101 | + TAGS="${DOCKERHUB_IMAGE}:${PYTHON_VERSION},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" |
| 102 | + TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" |
| 103 | + TAGS="${TAGS},${DOCKERHUB_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" |
| 104 | + TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MAJOR}" |
| 105 | + TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${MINOR}" |
| 106 | + TAGS="${TAGS},${GHCR_IMAGE}:${PYTHON_VERSION}-gh-${VERSION}" |
| 107 | + echo "tags=${TAGS}" >> $GITHUB_OUTPUT |
| 108 | + echo "version=${VERSION}" >> $GITHUB_OUTPUT |
| 109 | + echo "dockerhub_image=${DOCKERHUB_IMAGE}" >> $GITHUB_OUTPUT |
| 110 | + echo "ghcr_image=${GHCR_IMAGE}" >> $GITHUB_OUTPUT |
| 111 | + |
| 112 | + - name: Set up QEMU |
| 113 | + uses: docker/setup-qemu-action@v3 |
| 114 | + with: |
| 115 | + platforms: all |
| 116 | + |
| 117 | + - name: Set up Docker Buildx |
| 118 | + id: buildx |
| 119 | + uses: docker/setup-buildx-action@v3 |
| 120 | + |
| 121 | + - name: Login to DockerHub |
| 122 | + uses: docker/login-action@v3 |
| 123 | + with: |
| 124 | + username: ${{ secrets.DOCKER_USERNAME }} |
| 125 | + password: ${{ secrets.DOCKER_PASSWORD }} |
| 126 | + |
| 127 | + - name: Login to Github Container Registry |
| 128 | + uses: docker/login-action@v3 |
| 129 | + with: |
| 130 | + registry: ghcr.io |
| 131 | + username: ${{ github.repository_owner }} |
| 132 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 133 | + |
| 134 | + - name: Build and push |
| 135 | + uses: docker/build-push-action@v6 |
| 136 | + with: |
| 137 | + builder: ${{ steps.buildx.outputs.name }} |
| 138 | + context: . |
| 139 | + file: ./Dockerfile |
| 140 | + platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 |
| 141 | + push: true |
| 142 | + tags: ${{ steps.prep.outputs.tags }} |
| 143 | + labels: org.opencontainers.image.version=${{ steps.prep.outputs.version }} |
| 144 | + |
83 | 145 | python-3-12: |
84 | 146 | needs: python-3-11 |
85 | 147 | runs-on: ubuntu-latest |
|
0 commit comments