diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 4059af73..eb9ef57a 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -13,14 +13,14 @@ jobs: REPOSITORY: ghcr.io/${{ github.repository }} steps: - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to GitHub Container Registry if: github.repository_owner == 'k8snetworkplumbingwg' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -28,9 +28,10 @@ jobs: - name: Push to GitHub Container Registry if: github.repository_owner == 'k8snetworkplumbingwg' - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: push: true + platform: linux/amd64 tags: | ghcr.io/${{ github.repository }}:latest-amd64 ghcr.io/${{ github.repository }}:snapshot-amd64 @@ -39,9 +40,11 @@ jobs: - name: Create manifest for multi-arch images if: github.repository_owner == 'k8snetworkplumbingwg' run: | + docker pull ${REPOSITORY}:snapshot-amd64 docker manifest create ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-amd64 docker manifest annotate ${REPOSITORY}:snapshot ${REPOSITORY}:snapshot-amd64 --arch amd64 docker manifest push ${REPOSITORY}:snapshot + docker pull ${REPOSITORY}:latest-amd64 docker manifest create ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 docker manifest annotate ${REPOSITORY}:latest ${REPOSITORY}:latest-amd64 --arch amd64 docker manifest push ${REPOSITORY}:latest