fix(ci): pin nfpm container version and binary location

This commit is contained in:
kolaente 2022-12-19 15:36:39 +01:00
parent 6a97a214a3
commit 0104aa504b
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 5 additions and 5 deletions

View File

@ -504,7 +504,7 @@ steps:
# Build os packages and push it to our bucket
- name: build-os-packages-unstable
image: goreleaser/nfpm
image: goreleaser/nfpm:v2.22.2
pull: true
commands:
- apk add git go
@ -520,7 +520,7 @@ steps:
depends_on: [ after-build-compress ]
- name: build-os-packages-version
image: goreleaser/nfpm
image: goreleaser/nfpm:v2.22.2
pull: true
commands:
- apk add git go
@ -719,6 +719,6 @@ steps:
- failure
---
kind: signature
hmac: a8937e26dc5d29676571fd36ab58a883e65eee13b6cd0f86b9a115c234179685
hmac: f3b261d9329113993cdf8ae785daee6f0b2c0ea38662d2714385d7a31f7e5b2f
...

View File

@ -703,7 +703,7 @@ func (Release) Packages() error {
binpath := "nfpm"
err = exec.Command(binpath).Run()
if err != nil && strings.Contains(err.Error(), "executable file not found") {
binpath = "/nfpm"
binpath = "/usr/bin/nfpm"
err = exec.Command(binpath).Run()
}
if err != nil && strings.Contains(err.Error(), "executable file not found") {
@ -712,7 +712,7 @@ func (Release) Packages() error {
os.Exit(1)
}
// Because nfpm does not support templating, we replace the values in the config file and restore it after running
// Because nfpm does not support templating, we replace the values in the config file and restore it after running
nfpmConfigPath := RootPath + "/nfpm.yaml"
nfpmconfig, err := os.ReadFile(nfpmConfigPath)
if err != nil {