another way through github scripts
@@ -13,17 +13,22 @@ jobs:
shell: bash -l {0}
steps:
- name: Try setting pull number #https://stackoverflow.com/a/60723400/1469195
+ id: get-pr-number
uses: actions/github-script@v4
with:
github-token: ${{github.token}}
script: |
const prNumber = context.payload.number;
core.exportVariable('PULL_NUMBER', prNumber);
+ return prNumber
+ result-encoding: string
- name: Show some stuff
env:
PR_NUMBER: ${{ github.event.number }}
EVENT_OBJ: ${{ toJson(github.event) }}
run: |
+ echo "steps.set-result.outputs.result"
+ echo "${{steps.set-result.outputs.result}}"
echo "PULL_NUMBER"
echo $PULL_NUMBER
echo "EVENT_OBJ"
