Skip to content

Commit c16c5c0

Browse files
committed
passing build job_id to download artifacts
1 parent 79dd6dc commit c16c5c0

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Build Package
22

3-
on: [workflow_call]
3+
on:
4+
workflow_call:
5+
outputs:
6+
build_run_id: ${{ github.run_id }}
47
env:
58
PARTICLE_WINDOWS_SIGNING_CERT: ${{ secrets.PARTICLE_WINDOWS_SIGNING_CERT }}
69
PARTICLE_WINDOWS_SIGNING_PASS: ${{ secrets.PARTICLE_WINDOWS_SIGNING_PASS }}

.github/workflows/publish-v2.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
required: true
88
description: 'The environment to publish to'
99
default: 'staging'
10+
build_run_id:
11+
type: number
12+
required: true
13+
description: 'The build run id'
1014
jobs:
1115
publish:
1216
runs-on: ubuntu-latest
@@ -24,9 +28,11 @@ jobs:
2428
- name: Install dependencies
2529
run: npm install
2630

27-
- name: Download artifacts
28-
uses: actions/download-artifact@v2
31+
32+
- name: Download workflow artifact
33+
uses: dawidd6/action-download-artifact@v3.1.4
2934
with:
35+
run_id: ${{ inputs.build_run_id }}
3036
name: package
3137
path: build/
3238

.github/workflows/staging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ jobs:
1717
needs: call-build
1818
with:
1919
environment: staging
20+
build_run_id: ${{ needs.call-build.outputs.build_run_id }}
2021

0 commit comments

Comments
 (0)