Build process #13
This file contains 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: build process | |
run-name: Build process | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" | |
push: | |
branches: | |
- "main" | |
pull_request: {} | |
jobs: | |
trigger-build-containers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Start containers build | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'build-containers.yml', | |
ref: context.ref, | |
}); | |
trigger-build-containers-bootc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Start bootc containers build | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'build-containers-bootc.yml', | |
ref: context.ref, | |
}); | |
wait-for-build-containers: | |
runs-on: ubuntu-latest | |
needs: trigger-build-containers | |
steps: | |
- name: Wait for build-containers to complete | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.ref }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
check-name: 'build-containers (ubuntu-latest)' | |
wait-interval: 10 | |
wait-for-build-containers-bootc: | |
runs-on: ubuntu-latest | |
needs: trigger-build-containers-bootc | |
steps: | |
- name: Wait for build-container-centos to complete | |
uses: lewagon/[email protected] | |
with: | |
ref: ${{ github.ref }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
check-name: 'build-containers-bootc (ubuntu-latest)' | |
wait-interval: 10 | |
trigger-build-containers-optional: | |
runs-on: ubuntu-latest | |
needs: | |
- wait-for-build-containers | |
- wait-for-build-containers-bootc | |
steps: | |
- name: Start optional container - code | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'build-container-code.yml', | |
ref: context.ref, | |
}); | |
- name: Start optional container - rdesktop | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'build-container-rdesktop.yml', | |
ref: context.ref, | |
}); | |
- name: Start optional container - toolbox | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
await github.rest.actions.createWorkflowDispatch({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
workflow_id: 'build-container-toolbox.yml', | |
ref: context.ref, | |
}); |