1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CICD: Also push container images to GitHub Container Registry (ghcr.io) (#2418)

Signed-off-by: Grant Slater <github@firefishy.com>
This commit is contained in:
Grant
2023-06-02 15:26:20 +01:00
committed by GitHub
parent 83e41e5169
commit 5477b10cf7
2 changed files with 23 additions and 0 deletions

View File

@ -9,6 +9,8 @@ jobs:
draft_release:
name: draft release
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout repo
@ -22,6 +24,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v4
with:

View File

@ -71,6 +71,7 @@ nfpms:
dockers:
- image_templates:
- &amd_image "stackexchange/{{.ProjectName}}:{{ .Version }}-amd64"
- &amd_image_ghcr "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}-amd64"
goos: linux
goarch: amd64
use: buildx
@ -86,6 +87,7 @@ dockers:
- "--platform=linux/amd64"
- image_templates:
- &386_image "stackexchange/{{.ProjectName}}:{{ .Version }}-386"
- &386_image_ghcr "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}-386"
goos: linux
goarch: '386'
use: buildx
@ -101,6 +103,7 @@ dockers:
- "--platform=linux/i386"
- image_templates:
- &arm_image "stackexchange/{{.ProjectName}}:{{ .Version }}-arm64"
- &arm_image_ghcr "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}-arm64"
goos: linux
goarch: arm64
use: buildx
@ -120,12 +123,23 @@ docker_manifests:
- *amd_image
- *386_image
- *arm_image
- name_template: "ghcr.io/stackexchange/{{.ProjectName}}:{{ .Version }}"
image_templates:
- *amd_image_ghcr
- *386_image_ghcr
- *arm_image_ghcr
- name_template: "stackexchange/{{.ProjectName}}:latest"
skip_push: auto
image_templates:
- *amd_image
- *386_image
- *arm_image
- name_template: "ghcr.io/stackexchange/{{.ProjectName}}:latest"
skip_push: auto
image_templates:
- *amd_image_ghcr
- *386_image_ghcr
- *arm_image_ghcr
checksum:
name_template: 'checksums.txt'
snapshot: