mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-04 04:22:59 +00:00
Attempt to fix GPG issues
This commit is contained in:
parent
b2858a6bfc
commit
22750fd5a4
46
.github/workflows/release.yml
vendored
46
.github/workflows/release.yml
vendored
@ -18,19 +18,43 @@ jobs:
|
|||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.15
|
||||||
|
-
|
||||||
|
name: Install the required version of GoReleaser
|
||||||
|
env:
|
||||||
|
GORELEASER_VERSION: '0.155.1'
|
||||||
|
run: |
|
||||||
|
curl -sL -o goreleaser_amd64.deb "https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/goreleaser_amd64.deb"
|
||||||
|
sudo dpkg -i goreleaser_amd64.deb
|
||||||
|
rm -f goreleaser_amd64.deb
|
||||||
-
|
-
|
||||||
name: Import the GPG signing key
|
name: Import the GPG signing key
|
||||||
id: import_gpg
|
env:
|
||||||
uses: danitso/ghaction-import-gpg@master
|
GPG_KEY: ${{ secrets.GPG_KEY }}
|
||||||
with:
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
gpg-private-key: ${{ secrets.GPG_KEY }}
|
run: |
|
||||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
mkdir -p ~/.gnupg
|
||||||
|
|
||||||
|
cat << EOF > ~/.gnupg/gpg.conf
|
||||||
|
use-agent
|
||||||
|
pinentry-mode loopback
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "$GPG_KEY" | base64 -d | gpg --batch --allow-secret-key-import --import
|
||||||
|
gpg --keyid-format LONG --list-secret-keys
|
||||||
|
|
||||||
|
cat << EOF > ~/.gnupg/gpg-agent.conf
|
||||||
|
default-cache-ttl 7200
|
||||||
|
max-cache-ttl 31536000
|
||||||
|
allow-loopback-pinentry
|
||||||
|
allow-preset-passphrase
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo RELOADAGENT | gpg-connect-agent
|
||||||
|
|
||||||
|
printf '%s' "$GPG_PASSPHRASE" > ./.gpg_passphrase
|
||||||
-
|
-
|
||||||
name: Create release
|
name: Create release
|
||||||
uses: danitso/goreleaser-action@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
args: release --rm-dist
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
run: |
|
||||||
|
goreleaser build --parallelism 2 --rm-dist --timeout 1h
|
||||||
|
46
.github/workflows/test.yml
vendored
46
.github/workflows/test.yml
vendored
@ -20,19 +20,43 @@ jobs:
|
|||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.15
|
||||||
|
-
|
||||||
|
name: Install the required version of GoReleaser
|
||||||
|
env:
|
||||||
|
GORELEASER_VERSION: '0.155.1'
|
||||||
|
run: |
|
||||||
|
curl -sL -o goreleaser_amd64.deb "https://github.com/goreleaser/goreleaser/releases/download/v${GORELEASER_VERSION}/goreleaser_amd64.deb"
|
||||||
|
sudo dpkg -i goreleaser_amd64.deb
|
||||||
|
rm -f goreleaser_amd64.deb
|
||||||
-
|
-
|
||||||
name: Import the GPG signing key
|
name: Import the GPG signing key
|
||||||
id: import_gpg
|
env:
|
||||||
uses: danitso/ghaction-import-gpg@master
|
GPG_KEY: ${{ secrets.GPG_KEY }}
|
||||||
with:
|
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
|
||||||
gpg-private-key: ${{ secrets.GPG_KEY }}
|
run: |
|
||||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
mkdir -p ~/.gnupg
|
||||||
|
|
||||||
|
cat << EOF > ~/.gnupg/gpg.conf
|
||||||
|
use-agent
|
||||||
|
pinentry-mode loopback
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "$GPG_KEY" | base64 -d -i | gpg --batch --allow-secret-key-import --import
|
||||||
|
gpg --keyid-format LONG --list-secret-keys
|
||||||
|
|
||||||
|
cat << EOF > ~/.gnupg/gpg-agent.conf
|
||||||
|
default-cache-ttl 7200
|
||||||
|
max-cache-ttl 31536000
|
||||||
|
allow-loopback-pinentry
|
||||||
|
allow-preset-passphrase
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo RELOADAGENT | gpg-connect-agent
|
||||||
|
|
||||||
|
printf '%s' "$GPG_PASSPHRASE" > ./.gpg_passphrase
|
||||||
-
|
-
|
||||||
name: Create release
|
name: Create release
|
||||||
uses: danitso/goreleaser-action@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
args: release --rm-dist --snapshot
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GPG_FINGERPRINT: ${{ secrets.GPG_FINGERPRINT }}
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
run: |
|
||||||
|
goreleaser build --parallelism 2 --rm-dist --snapshot --timeout 1h
|
||||||
|
37
.goreleaser.test.yml
Normal file
37
.goreleaser.test.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
mod_timestamp: '{{ .CommitTimestamp }}'
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
|
||||||
|
goos:
|
||||||
|
- freebsd
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- '386'
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: '386'
|
||||||
|
binary: '{{ .ProjectName }}_v{{ .Version }}'
|
||||||
|
archives:
|
||||||
|
- format: zip
|
||||||
|
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
|
||||||
|
checksum:
|
||||||
|
name_template: '{{ .ProjectName }}_{{ .Version }}_SHA256SUMS'
|
||||||
|
algorithm: sha256
|
||||||
|
signs:
|
||||||
|
- artifacts: none
|
||||||
|
release:
|
||||||
|
draft: false
|
||||||
|
changelog:
|
||||||
|
skip: true
|
@ -37,8 +37,11 @@ signs:
|
|||||||
- "{{ .Env.GPG_FINGERPRINT }}"
|
- "{{ .Env.GPG_FINGERPRINT }}"
|
||||||
- "--output"
|
- "--output"
|
||||||
- "${signature}"
|
- "${signature}"
|
||||||
|
- "--passphrase-fd"
|
||||||
|
- "0"
|
||||||
- "--detach-sign"
|
- "--detach-sign"
|
||||||
- "${artifact}"
|
- "${artifact}"
|
||||||
|
stdin_file: ./.gpg_passphrase
|
||||||
release:
|
release:
|
||||||
draft: false
|
draft: false
|
||||||
changelog:
|
changelog:
|
||||||
|
Loading…
Reference in New Issue
Block a user