Trigger TeamCity Builds #30
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: Trigger TeamCity Builds | |
on: | |
workflow_run: | |
workflows: ["Build-Test-Release"] | |
types: | |
- completed | |
workflow_dispatch: # Allows manual triggering | |
jobs: | |
inputs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Workflow Inputs | |
run: | | |
echo "Event name: ${{ github.event_name }}" | |
echo "Workflow conclusion: ${{ github.event.workflow_run.conclusion }}" | |
echo "New release published: ${{ github.event.workflow_run.outputs.new_release_published }}" | |
trigger-teamcity: | |
runs-on: ubuntu-latest | |
# Run if manually triggered or if a new release was published | |
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.outputs.new_release_published == 'true') }} | |
steps: | |
- name: Trigger TeamCity Build for alpha.bloomlibrary.org | |
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_BloomLibraryOrg_BloomLibraryAlphaAlphaBloomlibraryOrgContinuous"}}' | |
- 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"}}' | |
- name: Trigger TeamCity Build for dev-alpha.bloomlibrary.org | |
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_BloomLibraryOrg_BloomLibrary2masterDevAlphaBloomlibraryOrgContinuous"}}' |