json escaping #20
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 downstream builds | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
verify_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "check release libs" | |
id: check | |
run: | | |
scripts/ci/check-release-libs.sh --list-assets | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
outputs: | |
PACT_FFI_REL_TAG: ${{ env.PACT_FFI_REL_TAG }} | |
PACT_FFI_VERSION: ${{ env.PACT_FFI_VERSION }} | |
trigger_client_libraries: | |
needs: verify_release | |
strategy: | |
fail-fast: false | |
matrix: | |
repos: | |
[ | |
# "you54f/pact-go", | |
# "you54f/pact-php", | |
# "you54f/pact-net", | |
"pact-js-core", | |
] | |
runs-on: ubuntu-latest | |
steps: | |
# - name: "Trigger client workflows" | |
# uses: peter-evans/repository-dispatch@v3 | |
# with: | |
# event-type: pact-ffi-released | |
# repository: ${{ matrix.repos }} | |
# token: ${{ secrets.GH_TOKEN_PACT_FFI_CLIENT_LIBRARY_UPDATE }} | |
# client-payload: '{ "version": "${{ needs.verify_release.outputs.PACT_FFI_VERSION }}","PACT_FFI_VERSION": "${{ needs.verify_release.outputs.PACT_FFI_VERSION }}", "PACT_FFI_REL_TAG": "${{ needs.verify_release.outputs.PACT_FFI_REL_TAG }}" }' | |
# # client-payload: '{ "PACT_FFI_VERSION": "${{ needs.verify_release.outputs.PACT_FFI_VERSION }}", "PACT_FFI_REL_TAG": "${{ needs.verify_release.outputs.PACT_FFI_REL_TAG }}" }' | |
# - uses: convictional/trigger-workflow-and-wait@v1.6.1 | |
# with: | |
# owner: you54f | |
# repo: ${{ matrix.repos }} | |
# github_token: ${{ secrets.GH_TOKEN_PACT_FFI_CLIENT_LIBRARY_UPDATE }} | |
# workflow_file_name: build-and-test.yml | |
# wait_interval: 10 | |
# # ref: master | |
# ref: chore/upgrade-to-pact-ffi-v${{ needs.verify_release.outputs.PACT_FFI_VERSION }} | |
# client_payload: '{ "PACT_FFI_VERSION": "${{ needs.verify_release.outputs.PACT_FFI_VERSION }}" }' | |
# # propagate_failure: false | |
# # trigger_workflow: true | |
# # wait_workflow: true | |
- name: trigger workflow | |
run: gh workflow run --repo you54f/${{ matrix.repos }} build-and-test.yml --ref chore/upgrade-to-pact-ffi-v${{ needs.verify_release.outputs.PACT_FFI_VERSION }} -f PACT_FFI_VERSION=${{ needs.verify_release.outputs.PACT_FFI_VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PACT_FFI_CLIENT_LIBRARY_UPDATE }} | |
- name: get workflow id and watch workflow run | |
run: | | |
gh run list --repo you54f/pact-js-core --json databaseId --branch chore/upgrade-to-pact-ffi-v0.4.16 --limit 1 | |
RUN_ID=$(gh run list --repo you54f/${{ matrix.repos }} --json databaseId --branch chore/upgrade-to-pact-ffi-v${{ needs.verify_release.outputs.PACT_FFI_VERSION }} --limit 1 | jq '.[].[]') | |
gh run watch --repo you54f/${{ matrix.repos }} $RUN_ID | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PACT_FFI_CLIENT_LIBRARY_UPDATE }} |