Skip to content

Commit 07df141

Browse files
Upload to Github Container Registry (#479)
* tag images for gcr.io registry * remove extra line * remove trailing spaces
1 parent f3da182 commit 07df141

6 files changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/docker.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ jobs:
3636
username: ${{ secrets.DOCKERHUB_USERNAME }}
3737
password: ${{ secrets.DOCKERHUB_TOKEN }}
3838

39+
- name: Login to GitHub Container Registry
40+
uses: docker/login-action@v3
41+
with:
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
3946
- name: Install eget
4047
run: go install github.com/zyedidia/eget@latest
4148
env:

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: goreleaser
22

33
on:
4+
workflow_dispatch:
45
push:
56
tags:
67
- 'v*'
@@ -31,6 +32,13 @@ jobs:
3132
username: ${{ secrets.DOCKERHUB_USERNAME }}
3233
password: ${{ secrets.DOCKERHUB_TOKEN }}
3334

35+
- name: Login to GitHub Container Registry
36+
uses: docker/login-action@v3
37+
with:
38+
registry: ghcr.io
39+
username: ${{ github.actor }}
40+
password: ${{ secrets.GITHUB_TOKEN }}
41+
3442
- name: Install eget
3543
run: go install github.com/zyedidia/eget@latest
3644
env:

.github/workflows/snapshot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Publish snapshot to docker hub
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- master
@@ -30,6 +31,13 @@ jobs:
3031
username: ${{ secrets.DOCKERHUB_USERNAME }}
3132
password: ${{ secrets.DOCKERHUB_TOKEN }}
3233

34+
- name: Login to GitHub Container Registry
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.actor }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
3341
- name: Install eget
3442
run: go install github.com/zyedidia/eget@latest
3543
env:
@@ -44,6 +52,7 @@ jobs:
4452
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4553

4654
- name: Publish to DockerHub
55+
shell: bash
4756
run: |
4857
docker push creativeprojects/resticprofile:nightly-arm64v8
4958
docker push creativeprojects/resticprofile:nightly-amd64
@@ -53,4 +62,13 @@ jobs:
5362
docker manifest inspect "creativeprojects/resticprofile:nightly"
5463
docker manifest push "creativeprojects/resticprofile:nightly"
5564
65+
- name: Publish to GitHub Container Registry
5666
shell: bash
67+
run: |
68+
docker push ghcr.io/creativeprojects/resticprofile:nightly-arm64v8
69+
docker push ghcr.io/creativeprojects/resticprofile:nightly-amd64
70+
docker manifest create "ghcr.io/creativeprojects/resticprofile:nightly" \
71+
--amend "ghcr.io/creativeprojects/resticprofile:nightly-amd64" \
72+
--amend "ghcr.io/creativeprojects/resticprofile:nightly-arm64v8"
73+
docker manifest inspect "ghcr.io/creativeprojects/resticprofile:nightly"
74+
docker manifest push "ghcr.io/creativeprojects/resticprofile:nightly"

.goreleaser-docker-only.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ dockers:
3131
- image_templates:
3232
- "creativeprojects/resticprofile:latest-amd64"
3333
- "creativeprojects/resticprofile:{{ .RawVersion }}-amd64"
34+
- "ghcr.io/creativeprojects/resticprofile:latest-amd64"
35+
- "ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-amd64"
3436
ids:
3537
- resticprofile_targz
3638
use: buildx
@@ -52,6 +54,8 @@ dockers:
5254
- image_templates:
5355
- "creativeprojects/resticprofile:latest-arm64v8"
5456
- "creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8"
57+
- "ghcr.io/creativeprojects/resticprofile:latest-arm64v8"
58+
- "ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8"
5559
ids:
5660
- resticprofile_targz
5761
use: buildx
@@ -81,5 +85,15 @@ docker_manifests:
8185
- creativeprojects/resticprofile:latest-amd64
8286
- creativeprojects/resticprofile:latest-arm64v8
8387

88+
- name_template: ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}
89+
image_templates:
90+
- ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-amd64
91+
- ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8
92+
93+
- name_template: ghcr.io/creativeprojects/resticprofile:latest
94+
image_templates:
95+
- ghcr.io/creativeprojects/resticprofile:latest-amd64
96+
- ghcr.io/creativeprojects/resticprofile:latest-arm64v8
97+
8498
release:
8599
disable: true

.goreleaser-snapshot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ archives:
3030
dockers:
3131
- image_templates:
3232
- "creativeprojects/resticprofile:nightly-amd64"
33+
- "ghcr.io/creativeprojects/resticprofile:nightly-amd64"
3334
ids:
3435
- resticprofile_targz
3536
use: buildx
@@ -49,6 +50,7 @@ dockers:
4950
- "--build-arg=ARCH=amd64"
5051
- image_templates:
5152
- "creativeprojects/resticprofile:nightly-arm64v8"
53+
- "ghcr.io/creativeprojects/resticprofile:nightly-arm64v8"
5254
ids:
5355
- resticprofile_targz
5456
use: buildx

.goreleaser.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ dockers:
134134
- image_templates:
135135
- "creativeprojects/resticprofile:latest-amd64"
136136
- "creativeprojects/resticprofile:{{ .RawVersion }}-amd64"
137+
- "ghcr.io/creativeprojects/resticprofile:latest-amd64"
138+
- "ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-amd64"
137139
ids:
138140
- resticprofile_targz
139141
use: buildx
@@ -154,6 +156,8 @@ dockers:
154156
- image_templates:
155157
- "creativeprojects/resticprofile:latest-arm64v8"
156158
- "creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8"
159+
- "ghcr.io/creativeprojects/resticprofile:latest-arm64v8"
160+
- "ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8"
157161
ids:
158162
- resticprofile_targz
159163
use: buildx
@@ -181,6 +185,14 @@ docker_manifests:
181185
image_templates:
182186
- creativeprojects/resticprofile:latest-amd64
183187
- creativeprojects/resticprofile:latest-arm64v8
188+
- name_template: ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}
189+
image_templates:
190+
- ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-amd64
191+
- ghcr.io/creativeprojects/resticprofile:{{ .RawVersion }}-arm64v8
192+
- name_template: ghcr.io/creativeprojects/resticprofile:latest
193+
image_templates:
194+
- ghcr.io/creativeprojects/resticprofile:latest-amd64
195+
- ghcr.io/creativeprojects/resticprofile:latest-arm64v8
184196

185197
brews:
186198
-

0 commit comments

Comments
 (0)