Skip to content

Commit

Permalink
Fix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
s1061123 committed Apr 6, 2023
1 parent 8f72cf7 commit e005bed
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ 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 }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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
Expand All @@ -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

0 comments on commit e005bed

Please sign in to comment.