Skip to content

Commit 4445b13

Browse files
authored
Update docker.yml
Signed-off-by: Zoey <[email protected]>
1 parent 4669967 commit 4445b13

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/docker.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ jobs:
6767
tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-x86_64
6868
build-args: |
6969
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
7080
7181
build-aarch64:
7282
runs-on: ubuntu-24.04-arm
@@ -116,24 +126,21 @@ jobs:
116126
tags: ghcr.io/${{ steps.un.outputs.un }}/${{ github.event.repository.name }}:${{ steps.pr.outputs.pr }}-aarch64
117127
build-args: |
118128
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
119139
120140
merge:
121141
needs: [build-x86_64, build-aarch64]
122142
runs-on: ubuntu-latest
123143
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
137144
- name: Login to DockerHub
138145
if: ${{ github.event_name != 'pull_request' }}
139146
uses: docker/login-action@v3
@@ -213,16 +220,9 @@ jobs:
213220
run: echo "pr=$(echo pr-${{ github.ref_name }} | sed "s|refs/pull/:||g" | sed "s|/merge||g")" >> $GITHUB_OUTPUT
214221
- name: create multiarch
215222
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
226226
- name: show version (PR)
227227
if: ${{ github.event_name == 'pull_request' }}
228228
run: |

0 commit comments

Comments
 (0)