Skip to content

Trigger Dependent Builds #66

Trigger Dependent Builds

Trigger Dependent Builds #66

name: Trigger Dependent Builds
on:
workflow_dispatch: # Allows manual triggering
jobs:
trigger-builds:
runs-on: ubuntu-latest
steps:
- name: Trigger GHA for BloomLibrary2 master (alpha and dev-alpha)
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN_BLOOMLIBRARY2_ACTIONS }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'BloomBooks',
repo: 'BloomLibrary2',
workflow_id: 'build-and-deploy.yml',
ref: 'master'
});
- name: Trigger TeamCity Build for Bloom Reader Alpha
uses: fjogeleit/http-request-action@v1
with:
url: "${{ secrets.TEAMCITY_URL }}/app/rest/buildQueue"
method: "POST"
contentType: "application/json"
customHeaders: '{"Authorization": "Bearer ${{ secrets.TEAMCITY_TOKEN_RUN_BUILD }}"}'
data: '{"buildType": {"id": "Bloom_BloomReader_BloomReaderMasterAlphaContinuousPublish"}}'
- name: Trigger TeamCity Build for Bloom Desktop Alpha
uses: fjogeleit/http-request-action@v1
with:
url: "${{ secrets.TEAMCITY_URL }}/app/rest/buildQueue"
method: "POST"
contentType: "application/json"
customHeaders: '{"Authorization": "Bearer ${{ secrets.TEAMCITY_TOKEN_RUN_BUILD }}"}'
data: '{"buildType": {"id": "bt222"}}'