Skip to content

Commit

Permalink
Publish to ghcr.io instead of docker.pkg.github.com
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanjli committed Oct 19, 2021
1 parent 20ff5c4 commit a31f844
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ jobs:
go-version: 1.17

- name: "Docker login"
run: docker login docker.pkg.github.com -u docker -p ${{ secrets.GITHUB_TOKEN }}
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Release
run: make release
Expand Down
8 changes: 4 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ release:
dockers:
-
image_templates:
- "docker.pkg.github.com/sargassum-eco/fluitans/{{ .ProjectName }}:latest"
- "docker.pkg.github.com/sargassum-eco/fluitans/{{ .ProjectName }}:{{ .Major }}"
- "docker.pkg.github.com/sargassum-eco/fluitans/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}"
- "docker.pkg.github.com/sargassum-eco/fluitans/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
- "ghcr.io/sargassum-eco/fluitans/{{ .ProjectName }}:latest"
- "ghcr.io/sargassum-eco/fluitans/{{ .ProjectName }}:{{ .Major }}"
- "ghcr.io/sargassum-eco/fluitans/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}"
- "ghcr.io/sargassum-eco/fluitans/{{ .ProjectName }}:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
Expand Down

0 comments on commit a31f844

Please sign in to comment.