-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2.02 KB
/
Copy pathweekly-orchestrator.yml
File metadata and controls
63 lines (59 loc) · 2.02 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
62
63
name: Weekly Slurm Build Orchestrator
on:
schedule:
- cron: '0 2 * * 1' # Every Monday at 2:00 AM UTC
workflow_dispatch: # Allow manual triggering
jobs:
trigger-build-debs:
name: Trigger DEB Build
runs-on: ubuntu-latest
steps:
- name: 🚀 Trigger Build DEBs Workflow
uses: actions/github-script@v7
with:
script: |
try {
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-and-commit-slurm-debs.yml',
ref: context.ref,
inputs: {}
});
console.log('✅ DEB build workflow triggered successfully!');
} catch (error) {
console.error('❌ Failed to trigger DEB build workflow:', error.message);
throw error;
}
wait-for-debs:
name: Wait for DEB Build to Complete
needs: trigger-build-debs
runs-on: ubuntu-latest
steps:
- name: ⏳ Wait for DEB Build
run: |
echo "Waiting 15 minutes for DEB build to complete..."
sleep 900
echo "DEB build should be complete, proceeding to Docker build..."
trigger-build-docker:
name: Trigger Docker Build
needs: [trigger-build-debs, wait-for-debs]
runs-on: ubuntu-latest
steps:
- name: 🚀 Trigger Build Docker Workflow
uses: actions/github-script@v7
with:
script: |
try {
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-push-workflow.yml',
ref: context.ref,
inputs: {}
});
console.log('✅ Docker build workflow triggered successfully!');
} catch (error) {
console.error('❌ Failed to trigger Docker build workflow:', error.message);
throw error;
}