From 7d5f45b383c795daefa47a48b3c5a214175c7909 Mon Sep 17 00:00:00 2001 From: mdm-code Date: Thu, 13 Aug 2026 19:01:57 +0200 Subject: [PATCH 1/3] Update Goreleaser to dockers_v2 --- .goreleaser.yaml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d27f155..f0c0bd5 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -42,17 +42,20 @@ archives: - none* name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" -dockers: +dockers_v2: - id: tools - goos: linux - goarch: amd64 ids: - tq - image_templates: - - "ghcr.io/mdm-code/tq:latest" - - "ghcr.io/mdm-code/tq:{{ .Tag }}" - - "ghcr.io/mdm-code/tq:v{{ .Major }}" - skip_push: false + dockerfile: Dockerfile + images: + - "ghcr.io/mdm-code/tq" + tags: + - "latest" + - "{{ .Tag }}" + - "{{ .Major }}" + platforms: + - linux/amd64 + - linux/arm64 checksum: name_template: 'sha256sums.txt' From 1eca71277025b7af4184d025c001c6c38d33d7d8 Mon Sep 17 00:00:00 2001 From: mdm-code Date: Thu, 13 Aug 2026 19:02:25 +0200 Subject: [PATCH 2/3] Update Dockerfile to align with dockers_v2 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a977024..0ec6db5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ FROM scratch +ARG TARGETPLATFORM ENV PATH "$PATH:/bin" -COPY tq /bin/tq +COPY $TARGETPLATFORM/tq /bin/tq From ef1e9ac46579ce39b7fa8afca48e316faa18d800 Mon Sep 17 00:00:00 2001 From: mdm-code Date: Thu, 13 Aug 2026 20:02:56 +0200 Subject: [PATCH 3/3] Update the release Github action --- .github/workflows/release.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 16df9d3..7e49b21 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,24 +17,31 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.2.0 + uses: actions/checkout@v7 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v5.4.0 + uses: actions/setup-go@v7 with: go-version: '1.26' + # NOTE: add the qemu action before the buildx action if Dockerfile runs foreign-arch commands. + # - name: Setup Qemu + # uses: docker/setup-qemu-action@v4 + + - name: Setup Docker buildx for Goreleaser + uses: docker/setup-buildx-action@v4 + - name: Login to Github container registry - uses: docker/login-action@v3.4.0 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Release - uses: goreleaser/goreleaser-action@v6.3.0 + - name: Release with Goreleaser + uses: goreleaser/goreleaser-action@v7 with: distribution: goreleaser version: '~> v2'