Skip to content

Commit

Permalink
ci: add --platform for docker pull
Browse files Browse the repository at this point in the history
  • Loading branch information
doitian authored Dec 13, 2023
1 parent 7dbb5e7 commit d63a7ac
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,13 @@ jobs:

strategy:
matrix:
distro: [centos-7, bionic, aarch64]
include:
- distro: centos-7
platform: linux/amd64
- distro: bionic
platform: linux/amd64
- distro: aarch64
platform: linux/arm64

steps:
- name: Login to ghcr
Expand All @@ -109,7 +115,7 @@ jobs:
- name: Tag and push image
run: |
SRC_TAG=ghcr.io/nervosnetwork/ckb-docker-builder:${{ matrix.distro }}-${{ github.sha }}
docker pull "$SRC_TAG"
docker pull --platform ${{matrix.platform}} "$SRC_TAG"
docker tag "$SRC_TAG" ghcr.io/nervosnetwork/ckb-docker-builder:${{ matrix.distro }}-latest
docker push ghcr.io/nervosnetwork/ckb-docker-builder:${{ matrix.distro }}-latest
docker tag "$SRC_TAG" ghcr.io/nervosnetwork/ckb-docker-builder:${{ matrix.distro }}-${{ steps.tag.outputs.tag }}
Expand Down

0 comments on commit d63a7ac

Please sign in to comment.