Skip to content

Commit 6f1b8ae

Browse files
committed
Fixed artifact download in run-demo
1 parent d37229d commit 6f1b8ae

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/run-demo.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,21 @@ jobs:
1616
runs-on: windows-latest
1717

1818
steps:
19+
- name: Get latest build run
20+
id: get-run
21+
run: |
22+
$runs = Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/actions/workflows/ci.yml/runs?status=success&per_page=1" -Headers @{Authorization="Bearer ${{ secrets.GITHUB_TOKEN }}"}
23+
$runId = $runs.workflow_runs[0].id
24+
echo "run-id=$runId" >> $env:GITHUB_OUTPUT
25+
1926
- name: Download Build
2027
uses: actions/download-artifact@v4
2128
with:
2229
name: SentaurSurvivors-StandaloneWindows64
2330
path: ./Build
2431
github-token: ${{ secrets.GITHUB_TOKEN }}
25-
run-id: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }}
32+
repository: ${{ github.repository }}
33+
run-id: ${{ steps.get-run.outputs.run-id }}
2634

2735
- name: Run Build
2836
timeout-minutes: 10

0 commit comments

Comments
 (0)