Skip to content

Commit 1d9817a

Browse files
authored
feat: add publish of images in GHCR (#21)
1 parent 798f986 commit 1d9817a

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/workflows/release.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
release:
1013
runs-on: ubuntu-latest
@@ -30,10 +33,19 @@ jobs:
3033

3134
- name: Login to Docker Hub
3235
uses: docker/login-action@v1
36+
id: configure-login-dockerhub
3337
with:
3438
username: ${{ secrets.DOCKER_USERNAME }}
3539
password: ${{ secrets.DOCKER_PASSWORD }}
3640

41+
- name: Docker Login
42+
uses: docker/login-action@v1
43+
id: configure-login-ghcr
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.repository_owner }}
47+
password: ${{ secrets.GH_PAT }}
48+
3749
- name: Run GoReleaser
3850
uses: goreleaser/goreleaser-action@v1
3951
with:

.goreleaser.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ nfpms:
3737
dockers:
3838
- image_templates:
3939
- docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-amd64
40+
- ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-amd64
4041
goarch: amd64
4142
dockerfile: Dockerfile
4243
use: buildx
4344
build_flag_templates:
4445
- --platform=linux/amd64
4546
- image_templates:
4647
- docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-arm64
48+
- ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-arm64
4749
goarch: arm64
4850
dockerfile: Dockerfile
4951
use: buildx
@@ -58,3 +60,11 @@ docker_manifests:
5860
image_templates:
5961
- docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-amd64
6062
- docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-arm64
63+
- name_template: ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}
64+
image_templates:
65+
- ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-amd64
66+
- ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-arm64
67+
- name_template: ghcr.io/docplanner/github-flow-manager:latest
68+
image_templates:
69+
- ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-amd64
70+
- ghcr.io/docplanner/github-flow-manager:{{ trimprefix .Tag "v" }}-arm64

0 commit comments

Comments
 (0)