diff --git a/.github/workflows/ci_nightly.yaml b/.github/workflows/ci_nightly.yaml index 248ad2d..f20f8ba 100644 --- a/.github/workflows/ci_nightly.yaml +++ b/.github/workflows/ci_nightly.yaml @@ -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.XXXXXX)" + echo "$GPG_PRIVATE_KEY" | base64 -d >> "$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 @@ -70,7 +84,7 @@ jobs: - name: Run slow local tests run: | - IMAGE_TAG=${{ env.version }}-nightly \ + IMAGE_TAG=${{ env.version }}-nightly-amd64 \ KIND_CLUSTER_NAME=${{ env.TEST_CLUSTER_NAME }} \ NR_BACKEND_URL=${{ secrets.NR_STAGING_BACKEND_URL }} \ NR_INGEST_KEY=${{ secrets.OTELCOMM_NR_INGEST_KEY }} \ diff --git a/distributions/nr-otel-collector/.goreleaser-nightly.yaml b/distributions/nr-otel-collector/.goreleaser-nightly.yaml index 26e35c9..653f707 100644 --- a/distributions/nr-otel-collector/.goreleaser-nightly.yaml +++ b/distributions/nr-otel-collector/.goreleaser-nightly.yaml @@ -70,6 +70,12 @@ nfpms: maintainer: New Relic 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