Skip to content

Commit

Permalink
fix: push to docker registries
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo committed Jul 25, 2024
1 parent 1d85e73 commit 04ffede
Showing 1 changed file with 50 additions and 40 deletions.
90 changes: 50 additions & 40 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ dockers:
- '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}'
image_templates:
- "ghcr.io/tofuutils/tenv:{{ .Version }}-amd64"
- "registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-amd64"
skip_push: true

- use: buildx
goarch: arm64
Expand All @@ -225,6 +227,8 @@ dockers:
- '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}'
image_templates:
- "ghcr.io/tofuutils/tenv:{{ .Version }}-arm64"
- "registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-arm64"
skip_push: true

- use: buildx
goarch: arm
Expand All @@ -243,6 +247,8 @@ dockers:
- '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}'
image_templates:
- "ghcr.io/tofuutils/tenv:{{ .Version }}-arm"
- "registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-arm"
skip_push: true

- use: buildx
goarch: "386"
Expand All @@ -261,6 +267,8 @@ dockers:
- '--label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}'
image_templates:
- "ghcr.io/tofuutils/tenv:{{ .Version }}-386"
- "registry.hub.docker.com/tofuutils/tenv:{{ .Version }}-386"
skip_push: true

docker_manifests:
- name_template: ghcr.io/tofuutils/tenv:{{ .Version }}
Expand Down Expand Up @@ -300,14 +308,49 @@ docker_manifests:
skip_push: true

docker_signs:
- artifacts: all
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
args:
- "sign"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "${artifact}@${digest}"
- "--yes"
artifacts: all
output: true

signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
args:
[
"sign",
"--oidc-issuer=https://token.actions.githubusercontent.com",
"${artifact}@${digest}",
"--yes",
]
- "sign-blob"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
- "--yes"
artifacts: all
output: true

- cmd: gpg
args:
- "--pinentry-mode"
- "loopback"
- "--batch"
- "-u"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--passphrase"
- "{{ .Env.GPG_PASSPHRASE }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"
artifacts: all
signature: "${artifact}.gpgsig"
id: gpg

archives:
- format: tar.gz
Expand Down Expand Up @@ -339,39 +382,6 @@ checksum:
name_template: "{{ .ProjectName }}_{{ .Tag }}_checksums.txt"
algorithm: sha256

signs:
- cmd: cosign
env:
- COSIGN_EXPERIMENTAL=1
signature: "${artifact}.sig"
certificate: "${artifact}.pem"
args:
- "sign-blob"
- "--oidc-issuer=https://token.actions.githubusercontent.com"
- "--output-certificate=${certificate}"
- "--output-signature=${signature}"
- "${artifact}"
- "--yes"
artifacts: all
output: true

- artifacts: all
signature: "${artifact}.gpgsig"
id: gpg
cmd: gpg
args:
- "--pinentry-mode"
- "loopback"
- "--batch"
- "-u"
- "{{ .Env.GPG_FINGERPRINT }}"
- "--passphrase"
- "{{ .Env.GPG_PASSPHRASE }}"
- "--output"
- "${signature}"
- "--detach-sign"
- "${artifact}"

nfpms:
- file_name_template: "{{ .ProjectName }}_{{- .Tag }}_{{ .Arch }}"
maintainer: "https://github.com/dvaumoron"
Expand Down

0 comments on commit 04ffede

Please sign in to comment.