Skip to content

Commit

Permalink
ghcr.io support
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmalkmus committed Jul 28, 2021
1 parent 302766a commit 7925534
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release
on:
push:
tags:
- "*"
- "v*"

env:
GOVERSION: "1.16"
Expand All @@ -28,8 +28,14 @@ jobs:
restore-keys: ${{ runner.os }}-go-
- uses: docker/login-action@v1
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: goreleaser/goreleaser-action@v2
with:
args: release
Expand Down
25 changes: 21 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,24 @@ dockers:
- ids:
- docker
image_templates:
- "axiomhq/cli:{{ .Major }}"
- "axiomhq/cli:{{ .Major }}.{{ .Minor }}"
- "axiomhq/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "axiomhq/cli:latest"
- "docker.io/axiomhq/cli:{{ .Major }}"
- "docker.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}"
- "docker.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "docker.io/axiomhq/cli:latest"
- "ghcr.io/axiomhq/cli:{{ .Major }}"
- "ghcr.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}"
- "ghcr.io/axiomhq/cli:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "ghcr.io/axiomhq/cli:latest"
build_flag_templates:
- --platform=linux/amd64
- --label=org.opencontainers.image.title={{ .ProjectName }}
- --label=org.opencontainers.image.description={{ .ProjectName }}
- --label=org.opencontainers.image.url=https://axiom.co
- --label=org.opencontainers.image.source=https://github.com/axiomhq/cli
- --label=org.opencontainers.image.documentation=https://docs.axiom.co/reference/CLI
- --label=org.opencontainers.image.licenses=MIT
- --label=org.opencontainers.image.author=Axiom, Inc. <[email protected]>
- --label=org.opencontainers.image.created={{ .Date }}
- --label=org.opencontainers.image.revision={{ .FullCommit }}
- --label=org.opencontainers.image.version={{ .Version }}
- --label=org.opencontainers.image.vendor=Axiom, Inc.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ build: $(GORELEASER) dep.stamp $(call go-pkg-sourcefiles, ./...) ## Build the bi
.PHONY: clean
clean: ## Remove build and test artifacts
@echo ">> cleaning up artifacts"
@rm -rf $(DIST_DIR) $(COVERPROFILE)
@rm -rf bin $(DIST_DIR) $(MANPAGES_DIR) $(COVERPROFILE)

.PHONY: cover
cover: $(COVERPROFILE) ## Calculate the code coverage score
Expand Down

0 comments on commit 7925534

Please sign in to comment.