Skip to content

Commit 3f3ca3f

Browse files
committed
Test architecture builds before pushing
1 parent 2ece696 commit 3f3ca3f

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/build.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,30 @@ jobs:
5858
uv run dpn dockerfile --context "${context}"
5959
- name: Set up Docker Buildx
6060
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
61-
- name: Login to Docker Hub
62-
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
63-
with:
64-
username: ${{ secrets.DOCKERHUB_USERNAME }}
65-
password: ${{ secrets.DOCKERHUB_TOKEN }}
6661

67-
# Build and push
62+
# Build
6863
- name: Build image
69-
id: build-and-push
7064
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7
7165
with:
7266
context: .
7367
file: dockerfiles/${{ matrix.key }}.Dockerfile
7468
platforms: ${{ matrix.platform }}
75-
push: true
69+
load: true
7670
tags: ${{ env.IMAGE_NAME }}:${{ matrix.key }}-${{ matrix.arch }}
7771

7872
# Test
7973
- name: Run smoke tests
8074
run: |
81-
docker run --rm ${{ env.IMAGE_NAME }}@${{ steps.build-and-push.outputs.digest }} sh -c "node --version && npm --version && yarn --version && python --version && pip --version && pipenv --version && poetry --version && uv --version"
75+
docker run --rm ${{ env.IMAGE_NAME }}:${{ matrix.key }}-${{ matrix.arch }} sh -c "node --version && npm --version && yarn --version && python --version && pip --version && pipenv --version && poetry --version && uv --version"
76+
77+
# Push
78+
- name: Login to Docker Hub
79+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4
80+
with:
81+
username: ${{ secrets.DOCKERHUB_USERNAME }}
82+
password: ${{ secrets.DOCKERHUB_TOKEN }}
83+
- name: Push image
84+
run: docker push "${IMAGE_NAME}:${{ matrix.key }}-${{ matrix.arch }}"
8285

8386
deploy:
8487
name: Publish ${{ matrix.key }}

0 commit comments

Comments
 (0)