Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 50fdac8

Browse files
committed
reuse volume
1 parent 9e3c20d commit 50fdac8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/import_packages.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,25 @@ jobs:
1919
run: |
2020
python -m pip install --upgrade pip
2121
pip install "."
22+
23+
- name: Install GitHub CLI
24+
run: |
25+
sudo apt-get update
26+
sudo apt-get install -y gh
27+
28+
- name: Fetch latest successful workflow run ID
29+
id: get-run-id
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
workflow_id=".github/workflows/import_packages.yml"
34+
run_id=$(gh api --paginate repos/${{ github.repository }}/actions/runs --jq ".workflow_runs[] | select(.name == \"$workflow_id\" and .conclusion == \"success\") | .id" | head -n 1)
35+
echo "::set-output name=run_id::$run_id"
36+
37+
- name: Download the latest artifact
38+
run: |
39+
gh run download ${{ steps.get-run-id.outputs.run_id }}
40+
2241
- name: Run sync
2342
run: |
2443
export PYTHONPATH=$PYTHONPATH:./

0 commit comments

Comments
 (0)