From a19327273f5163b32e0e951ec2761e0feb36864a Mon Sep 17 00:00:00 2001 From: Rasmus Wejlgaard Date: Wed, 30 Apr 2025 10:05:59 +0100 Subject: [PATCH] fix: buildx requires setup before using it --- .github/workflows/publish-latest.yaml | 6 ++++++ .github/workflows/publish.yaml | 7 +++++++ Dockerfile | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-latest.yaml b/.github/workflows/publish-latest.yaml index fd1af2d..1918259 100644 --- a/.github/workflows/publish-latest.yaml +++ b/.github/workflows/publish-latest.yaml @@ -25,13 +25,19 @@ jobs: - uses: actions/setup-go@v3 with: go-version: 1.19 + - uses: actions/checkout@v3 + - name: Log in to the Container registry uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push Docker image uses: docker/build-push-action@v3.0.0 with: diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 271d023..52cb55e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,18 +11,25 @@ jobs: - uses: actions/setup-go@v3 with: go-version: 1.17 + - uses: actions/checkout@v3 + - name: Log in to the Container registry uses: docker/login-action@v2.0.0 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4.0.1 with: images: ghcr.io/${{ github.repository }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Build and push Docker image uses: docker/build-push-action@v3.0.0 with: diff --git a/Dockerfile b/Dockerfile index f77761d..44668d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.20 as builder +FROM golang:1.24 AS builder WORKDIR /workspace # Copy the Go Modules manifests