-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (53 loc) · 1.72 KB
/
binary.yml
File metadata and controls
61 lines (53 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build Binary and release
on:
workflow_dispatch:
jobs:
trigger-workers:
runs-on: ubuntu-latest
steps:
- name: Trigger Opus Worker
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
/repos/${{ github.repository }}/actions/workflows/opus.yml/dispatches \
-f "ref=main"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
wait-for-results:
needs: trigger-workers
runs-on: ubuntu-latest
steps:
- name: Wait for Worker Artifacts
run: |
echo "Checking for artifacts..."
for i in {1..30}; do
ARTIFACTS=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts" | jq -r '.artifacts[].name')
if echo "$ARTIFACTS" | grep -q "worker-output"; then
echo "Artifacts found!"
exit 0
fi
echo "Artifacts not found. Retrying in 30 seconds..."
sleep 30
done
echo "Timeout waiting for artifacts!"
exit 1
collect-and-release:
needs: wait-for-results
runs-on: ubuntu-latest
steps:
- name: Download Worker Artifacts
uses: actions/download-artifact@v4
with:
name: worker-output
path: artifacts/
- name: Display Collected Artifacts
run: ls -l artifacts/
- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: full-dump
path: artifacts/