@@ -52,12 +52,16 @@ jobs:
5252 run : |
5353 curl -X POST -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
5454 -H "Accept: application/vnd.github.v3+json" \
55- "https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/${{github.event.inputs.sha} }" \
55+ "https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/${GITHUB_EVENT_INPUTS_SHA }" \
5656 -d '{
57- "context": "${{ github.event.inputs.repo } }${{ env.status_suffix }}",
58- "target_url": "${{ steps.get_job.outputs.url } }",
57+ "context": "${GITHUB_EVENT_INPUTS_REPO }${{ env.status_suffix }}",
58+ "target_url": "${STEPS_GET_JOB_OUTPUTS_URL }",
5959 "state": "pending"
6060 }'
61+ env :
62+ GITHUB_EVENT_INPUTS_SHA : ${{github.event.inputs.sha}}
63+ GITHUB_EVENT_INPUTS_REPO : ${{ github.event.inputs.repo }}
64+ STEPS_GET_JOB_OUTPUTS_URL : ${{ steps.get_job.outputs.url }}
6165 - name : Checkout Repository
6266 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2
6367 with :
8185 - name : Build Terraform Google Conversion
8286 if : ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
8387 run : |
84- go mod edit -replace github.com/hashicorp/terraform-provider-google-beta=github.com/${{ github.event.inputs.owner }} /terraform-provider-google-beta@${{ github.event.inputs.tpgb-branch } }
88+ go mod edit -replace github.com/hashicorp/terraform-provider-google-beta=github.com/${GITHUB_EVENT_INPUTS_OWNER} /terraform-provider-google-beta@${GITHUB_EVENT_INPUTS_TPGB_BRANCH }
8589 go mod tidy
8690 make build
91+ env :
92+ GITHUB_EVENT_INPUTS_OWNER : ${{ github.event.inputs.owner }}
93+ GITHUB_EVENT_INPUTS_TPGB_BRANCH : ${{ github.event.inputs.tpgb-branch }}
8794 - name : Run Unit Tests
8895 if : ${{ !failure() && steps.pull_request.outputs.has_changes == 'true' }}
8996 run : |
@@ -93,9 +100,14 @@ jobs:
93100 run : |
94101 curl -X POST -H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
95102 -H "Accept: application/vnd.github.v3+json" \
96- "https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/${{github.event.inputs.sha} }" \
103+ "https://api.github.com/repos/GoogleCloudPlatform/magic-modules/statuses/${GITHUB_EVENT_INPUTS_SHA }" \
97104 -d '{
98- "context": "${{ github.event.inputs.repo } }${{ env.status_suffix }}",
99- "target_url": "${{ steps.get_job.outputs.url } }",
100- "state": "${{ job.status } }"
105+ "context": "${GITHUB_EVENT_INPUTS_REPO }${{ env.status_suffix }}",
106+ "target_url": "${STEPS_GET_JOB_OUTPUTS_URL }",
107+ "state": "${JOB_STATUS }"
101108 }'
109+ env :
110+ GITHUB_EVENT_INPUTS_SHA : ${{github.event.inputs.sha}}
111+ GITHUB_EVENT_INPUTS_REPO : ${{ github.event.inputs.repo }}
112+ STEPS_GET_JOB_OUTPUTS_URL : ${{ steps.get_job.outputs.url }}
113+ JOB_STATUS : ${{ job.status }}
0 commit comments