Skip to content

Commit 8647200

Browse files
committed
feat: publish docker images to GitHub Registry
1 parent 55465a1 commit 8647200

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ jobs:
4545
username: ${{ secrets.DOCKER_USER }}
4646
password: ${{ secrets.DOCKER_PASS }}
4747

48+
- name: Login to GitHub Container Registry
49+
uses: docker/login-action@v2
50+
with:
51+
registry: ghcr.io
52+
username: ${{ github.actor }}
53+
password: ${{ secrets.GITHUB_TOKEN }}
54+
4855
- name: Run GoReleaser
4956
uses: goreleaser/[email protected]
5057
with:

.goreleaser.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dockers:
1616
goarch: amd64
1717
image_templates:
1818
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
19+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
1920
build_flag_templates:
2021
- "--platform=linux/amd64"
2122
- "--build-arg=VERSION={{.Version}}"
@@ -26,6 +27,7 @@ dockers:
2627
goarch: arm64
2728
image_templates:
2829
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
30+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
2931
build_flag_templates:
3032
- "--platform=linux/arm64/v8"
3133
- "--build-arg=VERSION={{.Version}}"
@@ -48,6 +50,22 @@ docker_manifests:
4850
image_templates:
4951
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
5052
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
53+
- name_template: "ghcr.io/hipages/php-fpm_exporter:latest"
54+
image_templates:
55+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
56+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
57+
- name_template: "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
58+
image_templates:
59+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
60+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
61+
- name_template: "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}"
62+
image_templates:
63+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
64+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
65+
- name_template: "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}"
66+
image_templates:
67+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
68+
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
5169

5270
changelog:
5371
filters:

0 commit comments

Comments
 (0)