Skip to content

Commit

Permalink
update github action docker buildx action to v2
Browse files Browse the repository at this point in the history
This solves random build/push issues.
See: docker/build-push-action#761 (comment)

Signed-off-by: Blaine Gardner <[email protected]>
  • Loading branch information
BlaineEXE committed May 26, 2023
1 parent fbd57ab commit 71fc27e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 14 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build container image
uses: docker/build-push-action@v2
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build container image
uses: docker/build-push-action@v2
Expand All @@ -48,7 +48,7 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Build container image
uses: docker/build-push-action@v2
Expand All @@ -64,19 +64,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ghcr.io/${{ github.repository }}
tags: |
sha_${{ github.sha }}
latest
- name: Build container image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v4
with:
context: .
push: false
tags: ghcr.io/${{ github.repository }}:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile
platforms: linux/amd64, linux/arm64
8 changes: 4 additions & 4 deletions .github/workflows/image-push-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand All @@ -41,7 +41,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/image-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to Container Registry
if: github.repository_owner == 'k8snetworkplumbingwg'
Expand Down

0 comments on commit 71fc27e

Please sign in to comment.