Skip to content

Commit

Permalink
Move the github context into environment variables
Browse files Browse the repository at this point in the history
Move the github context under the run: configuration for the fetch step
into a set of environment variables under env: as they are empty within
run due to a currently known bug inside action runners.
  • Loading branch information
jonathanio committed May 23, 2023
1 parent 57d31a5 commit 2580fdf
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ description: |-
runs:
using: composite
steps:
- run: |-

- name: Fetch the pull-requester artifact
shell: bash
env:
# Both github.action_repository and .action_ref are not available inside
# the run: statement, but they are available under env: so set them here
# so they can be accessed as normal environment variable under the
# run: statement instead. See the following for more information:
# https://github.com/actions/runner/issues/2473
GH_ACTION_REPOSITORY: ${{ github.action_repository || github.repository }}
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
run: |-
${{ github.action_path }}/scripts/fetch \
"${{ github.action_repository }}" \
"${{ github.action_ref }}"
"${GH_ACTION_REPOSITORY}" \
"${GH_ACTION_REF}"
- name: Run pull-requester against the pull request
shell: bash
- run: |-
run: |-
${{ github.action_path }}/bin/pull-requester run
shell: bash
branding:
icon: user-check
Expand Down

0 comments on commit 2580fdf

Please sign in to comment.