From a7d909168aabc9d55b9f09bd7dbac0028a45ab7f Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Fri, 22 Nov 2024 09:48:38 +0100 Subject: [PATCH] Separate env variables in "transport" GHA workflow --- .github/workflows/transport.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/transport.yaml b/.github/workflows/transport.yaml index 7927821a7d..569bb8d4d5 100644 --- a/.github/workflows/transport.yaml +++ b/.github/workflows/transport.yaml @@ -1,7 +1,10 @@ name: MESSAGEix-Transport env: - target: transport.yaml --repo=iiasa/message_data + # The repository, branch, and workflow file name to dispatch + target-repo: iiasa/message_data + target-branch: dev + target-workflow: transport # Starting point of the workflow. # Use this value to build from a certain scenario: @@ -33,12 +36,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Invoke "transport.yaml" workflow in message_data + - name: Invoke "${{ env.target-workflow }}" workflow in ${{ env.target-repo }} env: GH_TOKEN: ${{ secrets.MESSAGE_DATA_DISPATCH_TOKEN }} run: | gh workflow run \ - ${{ env.target }} --ref=dev \ + ${{ env.target-workflow }}.yaml \ + --repo=${{ env.target-repo }} \ + --ref=${{ env.target-ref }} \ --field ref=${{ github.ref }} \ --field sha=${{ github.sha }} \ --field base=${{ env.base }} \ @@ -47,6 +52,6 @@ jobs: sleep 5 gh run list \ - --workflow=${{ env.target }} \ + --workflow=${{ env.target-workflow.yaml }} --repo=${{ env.target-repo }} \ --json url,status \ --jq 'map(select(.status != "completed"))[0].url' >> $GITHUB_STEP_SUMMARY