Skip to content

Commit

Permalink
Passing branch name to checkout step
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewJMiller committed Jul 17, 2024
1 parent fb27302 commit f1fe837
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/gcp-cloud-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ jobs:
name: brightspot-build
path: brightspot-build

- name: Get workflow version
id: workflows-ref
run: |
sha=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/<owner>/<repo>/actions/runs/${{ github.run_id }} | jq -r '.referenced_workflows[0] | .sha')
echo "caller-sha=$sha" >> $GITHUB_OUTPUT
- name: Get workflow reference
id: workflow-version
outputs:
caller-sha: ${{ steps.workflows-version.outputs.caller-sha }}
run: |
sha=$(curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/<owner>/<repo>/actions/runs/${{ github.run_id }} | jq -r '.referenced_workflows[0] | .sha')
echo "caller-sha=$sha" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit f1fe837

Please sign in to comment.