Skip to content

Commit

Permalink
chore: sign rpm/deb
Browse files Browse the repository at this point in the history
  • Loading branch information
mailo-nr committed Jan 23, 2025
1 parent ed943f3 commit d414b13
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/ci_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,32 @@ jobs:
gpg_private_key: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }}
passphrase: ${{ secrets.OHAI_GPG_PASSPHRASE }}

- name: Write GPG to path in memory
id: write_gpg_to_path
run: |
GPG_KEY_PATH="$(mktemp /dev/shm/gpg.key)"
echo "$GPG_PRIVATE_KEY" >> "$GPG_KEY_PATH"
echo "gpg_key_path=$GPG_KEY_PATH" >> $GITHUB_OUTPUT
env:
GPG_PRIVATE_KEY: ${{ secrets.OHAI_GPG_PRIVATE_KEY_BASE64 }}

- name: Build binaries & packages with GoReleaser
id: goreleaser_snapshot
uses: goreleaser/goreleaser-action@v6
env:
NFPM_PASSPHRASE: ${{ secrets.OHAI_GPG_PASSPHRASE }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GPG_KEY_PATH: ${{ steps.write_gpg_to_path.outputs.gpg_key_path }}
REGISTRY: "newrelic/nr-otel-collector"
with:
distribution: goreleaser
version: '~> v2'
args: --snapshot --clean --skip=publish,validate --timeout 2h --config .goreleaser-nightly.yaml
workdir: distributions/nr-otel-collector

- name: List contents of dist folder
run: ls -la distributions/nr-otel-collector/dist

- name: Extract image version
run: echo "version=$(echo '${{ steps.goreleaser_snapshot.outputs.metadata }}' | jq -r '.version')" >> $GITHUB_ENV

Expand Down
6 changes: 6 additions & 0 deletions distributions/nr-otel-collector/.goreleaser-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ nfpms:
maintainer: New Relic <caos-team@newrelic.com>
description: OpenTelemetry Collector - nr-otel-collector
license: Apache 2.0
rpm:
signature:
key_file: "{{ .Env.GPG_KEY_PATH }}"
deb:
signature:
key_file: "{{ .Env.GPG_KEY_PATH }}"

dockers:
- goos: linux
Expand Down

0 comments on commit d414b13

Please sign in to comment.