Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
19 changes: 11 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
FROM scratch
ARG TARGETPLATFORM
ENV PATH "$PATH:/bin"
COPY tq /bin/tq
COPY $TARGETPLATFORM/tq /bin/tq
Loading