build: push docker image to ghcr.io (#1237)
with the new recent changes in dockerhub[1] we should start pushing images to ghcr, and eventually phase out the existing dockerhub setup. [1]: https://blog.alexellis.io/docker-is-deleting-open-source-images/ Signed-off-by: Chinmay D. Pai <chinmay.pai@zerodha.com>
This commit is contained in:
parent
101459f2f6
commit
8c46b758ce
2 changed files with 20 additions and 2 deletions
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
|
@ -25,6 +25,13 @@ jobs:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Docker Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Prepare Dependencies
|
- name: Prepare Dependencies
|
||||||
run: |
|
run: |
|
||||||
make dist
|
make dist
|
||||||
|
|
|
@ -37,14 +37,25 @@ archives:
|
||||||
- LICENSE
|
- LICENSE
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
-
|
- goos: linux
|
||||||
goos: linux
|
|
||||||
goarch: amd64
|
goarch: amd64
|
||||||
ids:
|
ids:
|
||||||
- listmonk
|
- listmonk
|
||||||
image_templates:
|
image_templates:
|
||||||
- "listmonk/listmonk:latest"
|
- "listmonk/listmonk:latest"
|
||||||
- "listmonk/listmonk:{{ .Tag }}"
|
- "listmonk/listmonk:{{ .Tag }}"
|
||||||
|
- "ghcr.io/knadh/{{ .ProjectName }}:latest"
|
||||||
|
- "ghcr.io/knadh/{{ .ProjectName }}:{{ .Tag }}"
|
||||||
|
build_flag_templates:
|
||||||
|
- --platform=linux/amd64
|
||||||
|
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.url=https://github.com/knadh/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.source=https://github.com/knadh/{{ .ProjectName }}
|
||||||
|
- --label=org.opencontainers.image.version={{ .Version }}
|
||||||
|
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
|
||||||
|
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||||
|
- --label=org.opencontainers.image.licenses=AGPL-3.0
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
extra_files:
|
extra_files:
|
||||||
- config.toml.sample
|
- config.toml.sample
|
||||||
|
|
Loading…
Reference in a new issue