Skip to content

Commit 8e653eb

Browse files
committed
[skip ci] add run id for downloading artifacts
1 parent 903a2d9 commit 8e653eb

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

.github/workflows/assertion.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,30 @@ on:
77
description: 'Agent version'
88
type: string
99
required: true
10-
artifactId:
11-
description: 'Artifact ID'
10+
runId:
11+
description: 'Run ID of the workflow that built the artifacts'
1212
type: string
1313
required: false
14+
signAssertion:
15+
description: 'Sign and store the assertion document'
16+
type: boolean
17+
required: false
18+
default: false
1419
workflow_call:
1520
inputs:
1621
packageVersion:
1722
description: 'Agent version'
1823
type: string
1924
required: true
25+
runId:
26+
description: 'Run ID of the workflow that built the artifacts'
27+
type: string
28+
required: false
29+
signAssertion:
30+
description: 'Sign and store the assertion document'
31+
type: boolean
32+
required: false
33+
default: false
2034
secrets:
2135
ARTIFACTORY_USER:
2236
required: true
@@ -51,18 +65,11 @@ jobs:
5165
cache: false
5266

5367
- name: Download nginx-agent binary artifacts
54-
if: ${{ inputs.artifactId == '' }}
55-
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # 6.0.0
56-
with:
57-
name: nginx-agent-binaries-${{ inputs.packageVersion }}-${{ matrix.osarch }}
58-
path: binaries
59-
60-
- name: Download nginx-agent binary artifact by ID
61-
if: ${{ inputs.artifactId != '' }}
68+
if: ${{ inputs.runId != '' }}
6269
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # 6.0.0
6370
with:
64-
artifact-ids: '${{ inputs.artifactId }}'
65-
path: binaries
71+
github-token: ${{ github.token }}
72+
run-id: ${{ inputs.runId }}
6673

6774
- name: Gather build dependencies
6875
id: godeps
@@ -98,6 +105,7 @@ jobs:
98105

99106
- name: Sign and Store Assertion Document
100107
id: sign
108+
if: ${{ inputs.signAssertion == true }}
101109
uses: nginxinc/compliance-rules/.github/actions/sign@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6 # v0.3.0
102110
with:
103111
assertion-doc: ${{ steps.assertiondoc.outputs.assertion-document-path }}

.github/workflows/release-branch.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,8 @@ jobs:
244244
VERSION: ${{ env.VERSION }}
245245
PACKAGE_BUILD: ${{ inputs.packageBuildNo }}
246246
run: |
247+
echo "Run ID: ${{ github.run_id }}"
248+
echo "Run Number: ${{ github.run_number }}"
247249
export PATH=$PATH:~/go/bin
248250
echo "$GPG_KEY" | base64 --decode > ${NFPM_SIGNING_KEY_FILE}
249251
make package
@@ -302,6 +304,7 @@ jobs:
302304
contents: read
303305
with:
304306
packageVersion: ${{ inputs.packageVersion }}
307+
runId: ${{ github.run_id }}
305308
secrets:
306309
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
307310
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}

0 commit comments

Comments
 (0)