diff --git a/.github/workflows/sync-and-apply-patches.yml b/.github/workflows/sync-and-apply-patches.yml index 86c7c74513a4e..d7f41b9425722 100644 --- a/.github/workflows/sync-and-apply-patches.yml +++ b/.github/workflows/sync-and-apply-patches.yml @@ -124,28 +124,29 @@ jobs: id-token: write # Needed for GHCR authentication steps: - # Set up Docker Buildx - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - # Log in to GitHub Container Registry - - name: Log in to GitHub Container Registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - # Checkout the specific tag - name: Checkout tag uses: actions/checkout@v3 with: ref: ${{ needs.sync-and-patch.outputs.tag }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + check-latest: true + - uses: docker/setup-qemu-action@v3 + - uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: fetch go modules + run: make vendor + - name: build rootless docker image + uses: docker/build-push-action@v5 with: context: . - file: Dockerfile.rootless + platforms: linux/amd64 push: true + file: Dockerfile.rootless tags: ghcr.io/${{ github.repository }}:${{ needs.sync-and-patch.outputs.tag }}