Weekly Slurm Build Orchestrator #54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
| } |