|
67 | 67 | tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-x86_64 |
68 | 68 | build-args: | |
69 | 69 | FLAGS=-march=x86-64-v2 -mtune=generic -fcf-protection=full |
| 70 | + - name: Build (PR) |
| 71 | + uses: docker/build-push-action@v6 |
| 72 | + if: ${{ github.event_name == 'pull_request' }} |
| 73 | + with: |
| 74 | + context: . |
| 75 | + file: ./python.Dockerfile |
| 76 | + push: true |
| 77 | + tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-python-x86_64 |
| 78 | + build-args: | |
| 79 | + IMAGE=ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-x86_64 |
70 | 80 | |
71 | 81 | build-aarch64: |
72 | 82 | runs-on: ubuntu-24.04-arm |
@@ -116,24 +126,21 @@ jobs: |
116 | 126 | tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-aarch64 |
117 | 127 | build-args: | |
118 | 128 | FLAGS=-mbranch-protection=standard |
| 129 | + - name: Build (PR) |
| 130 | + uses: docker/build-push-action@v6 |
| 131 | + if: ${{ github.event_name == 'pull_request' }} |
| 132 | + with: |
| 133 | + context: . |
| 134 | + file: ./python.Dockerfile |
| 135 | + push: true |
| 136 | + tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-python-aarch64 |
| 137 | + build-args: | |
| 138 | + IMAGE=ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-aarch64 |
119 | 139 |
|
120 | 140 | merge: |
121 | 141 | needs: [build-x86_64, build-aarch64] |
122 | 142 | runs-on: ubuntu-latest |
123 | 143 | steps: |
124 | | - - name: Checkout |
125 | | - if: ${{ github.event_name == 'pull_request' }} |
126 | | - uses: actions/checkout@v6 |
127 | | - - name: Set up QEMU |
128 | | - if: ${{ github.event_name == 'pull_request' }} |
129 | | - uses: docker/setup-qemu-action@v3 |
130 | | - with: |
131 | | - platforms: arm64 #all |
132 | | - - name: Set up Docker Buildx |
133 | | - if: ${{ github.event_name == 'pull_request' }} |
134 | | - uses: docker/setup-buildx-action@v3 |
135 | | - with: |
136 | | - driver-opts: env.BUILDKIT_STEP_LOG_MAX_SIZE=-1 |
137 | 144 | - name: Login to DockerHub |
138 | 145 | if: ${{ github.event_name != 'pull_request' }} |
139 | 146 | uses: docker/login-action@v3 |
@@ -213,16 +220,9 @@ jobs: |
213 | 220 | run: echo "pr=$(echo pr-${{ github.ref_name }} | sed "s|refs/pull/:||g" | sed "s|/merge||g")" >> $GITHUB_OUTPUT |
214 | 221 | - name: create multiarch |
215 | 222 | if: ${{ github.event_name == 'pull_request' }} |
216 | | - run: docker buildx imagetools create --tag ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-x86_64 ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-aarch64 |
217 | | - - name: Build (PR) |
218 | | - uses: docker/build-push-action@v6 |
219 | | - if: ${{ github.event_name == 'pull_request' }} |
220 | | - with: |
221 | | - context: . |
222 | | - file: ./python.Dockerfile |
223 | | - platforms: linux/amd64,linux/arm64 #,linux/amd64/v2,linux/amd64/v3,linux/amd64/v4 #,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6 |
224 | | - push: ${{ github.event_name == 'pull_request' }} |
225 | | - tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-python |
| 223 | + run: | |
| 224 | + docker buildx imagetools create --tag ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }} ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-x86_64 ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-aarch64 |
| 225 | + docker buildx imagetools create --tag ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-python ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-python-x86_64 ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-python-aarch64 |
226 | 226 | - name: show version (PR) |
227 | 227 | if: ${{ github.event_name == 'pull_request' }} |
228 | 228 | run: | |
|
0 commit comments