From e005bedd796c0919c43194e4964a44a83e1a1b3c Mon Sep 17 00:00:00 2001 From: Tomofumi Hayashi Date: Thu, 6 Apr 2023 17:02:45 +0900 Subject: [PATCH] Fix github action --- .github/workflows/push-master.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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