feat: publish docker images to GitHub Registry

This commit is contained in:
Enrico Stahn 2022-05-20 10:42:23 +02:00
parent 55465a1ab2
commit 86472005d0
No known key found for this signature in database
GPG key ID: 5263621C269A50DE
2 changed files with 25 additions and 0 deletions

View file

@ -45,6 +45,13 @@ jobs:
username: ${{ secrets.DOCKER_USER }} username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }} password: ${{ secrets.DOCKER_PASS }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.9.1 uses: goreleaser/goreleaser-action@v2.9.1
with: with:

View file

@ -16,6 +16,7 @@ dockers:
goarch: amd64 goarch: amd64
image_templates: image_templates:
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64" - "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
build_flag_templates: build_flag_templates:
- "--platform=linux/amd64" - "--platform=linux/amd64"
- "--build-arg=VERSION={{.Version}}" - "--build-arg=VERSION={{.Version}}"
@ -26,6 +27,7 @@ dockers:
goarch: arm64 goarch: arm64
image_templates: image_templates:
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64" - "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
build_flag_templates: build_flag_templates:
- "--platform=linux/arm64/v8" - "--platform=linux/arm64/v8"
- "--build-arg=VERSION={{.Version}}" - "--build-arg=VERSION={{.Version}}"
@ -48,6 +50,22 @@ docker_manifests:
image_templates: image_templates:
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64" - "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64" - "hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- name_template: "ghcr.io/hipages/php-fpm_exporter:latest"
image_templates:
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- name_template: "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}"
image_templates:
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- name_template: "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}"
image_templates:
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
- name_template: "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}"
image_templates:
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-amd64"
- "ghcr.io/hipages/php-fpm_exporter:{{ .Major }}.{{ .Minor }}.{{ .Patch }}-arm64"
changelog: changelog:
filters: filters: