Skip to content

Commit 7925534

Browse files
committed
ghcr.io support
1 parent 302766a commit 7925534

File tree

3 files changed

+29
-6
lines changed

3 files changed

+29
-6
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
push:
55
tags:
6-
- "*"
6+
- "v*"
77

88
env:
99
GOVERSION: "1.16"
@@ -28,8 +28,14 @@ jobs:
2828
restore-keys: ${{ runner.os }}-go-
2929
- uses: docker/login-action@v1
3030
with:
31+
registry: docker.io
3132
username: ${{ secrets.DOCKER_USERNAME }}
3233
password: ${{ secrets.DOCKER_PASSWORD }}
34+
- uses: docker/login-action@v1
35+
with:
36+
registry: ghcr.io
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.GITHUB_TOKEN }}
3339
- uses: goreleaser/goreleaser-action@v2
3440
with:
3541
args: release

.goreleaser.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,24 @@ dockers:
152152
- ids:
153153
- docker
154154
image_templates:
155-
- "axiomhq/cli:{{ .Major }}"
156-
- "axiomhq/cli:{{ .Major }}.{{ .Minor }}"
157-
- "axiomhq/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
158-
- "axiomhq/cli:latest"
155+
- "docker.io/axiomhq/cli:{{ .Major }}"
156+
- "docker.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}"
157+
- "docker.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
158+
- "docker.io/axiomhq/cli:latest"
159+
- "ghcr.io/axiomhq/cli:{{ .Major }}"
160+
- "ghcr.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}"
161+
- "ghcr.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
162+
- "ghcr.io/axiomhq/cli:latest"
163+
build_flag_templates:
164+
- --platform=linux/amd64
165+
- --label=org.opencontainers.image.title={{ .ProjectName }}
166+
- --label=org.opencontainers.image.description={{ .ProjectName }}
167+
- --label=org.opencontainers.image.url=https://axiom.co
168+
- --label=org.opencontainers.image.source=https://github.com/axiomhq/cli
169+
- --label=org.opencontainers.image.documentation=https://docs.axiom.co/reference/CLI
170+
- --label=org.opencontainers.image.licenses=MIT
171+
- --label=org.opencontainers.image.author=Axiom, Inc. <info@axiom.co>
172+
- --label=org.opencontainers.image.created={{ .Date }}
173+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
174+
- --label=org.opencontainers.image.version={{ .Version }}
175+
- --label=org.opencontainers.image.vendor=Axiom, Inc.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ build: $(GORELEASER) dep.stamp $(call go-pkg-sourcefiles, ./...) ## Build the bi
6666
.PHONY: clean
6767
clean: ## Remove build and test artifacts
6868
@echo ">> cleaning up artifacts"
69-
@rm -rf $(DIST_DIR) $(COVERPROFILE)
69+
@rm -rf bin $(DIST_DIR) $(MANPAGES_DIR) $(COVERPROFILE)
7070

7171
.PHONY: cover
7272
cover: $(COVERPROFILE) ## Calculate the code coverage score

0 commit comments

Comments
 (0)