Skip to content

Commit

Permalink
Use environment variables in workflow (#1865)
Browse files Browse the repository at this point in the history
* Use environment variables in workflow

* Add newsfragment
  • Loading branch information
davidegirardi authored Jun 12, 2024
1 parent 7916032 commit eb49b28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ jobs:
id: readctx
# we need to find the PR number that corresponds to the branch, which we do by
# searching the GH API
env:
OWNER_LOGIN: ${{ github.event.workflow_run.head_repository.owner.login }}
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
run: |
head_branch='${{github.event.workflow_run.head_repository.owner.login}}:${{github.event.workflow_run.head_branch}}'
head_branch="${OWNER_LOGIN}:${HEAD_BRANCH}"
echo "head branch: $head_branch"
pulls_uri="https://api.github.com/repos/${{ github.repository }}/pulls?head=$(jq -Rr '@uri' <<<$head_branch)"
pr_number=$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' "$pulls_uri" |
Expand Down
1 change: 1 addition & 0 deletions changelogs/internal/newsfragments/1865.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use environment variables for Netlify build job.

0 comments on commit eb49b28

Please sign in to comment.