ci: Add source run info

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
This commit is contained in:
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs 2021-07-24 13:21:25 +02:00
parent 849709775d
commit c0ae019bca
No known key found for this signature in database
GPG Key ID: 228A77789D71A6E2

View File

@ -9,10 +9,25 @@ on:
- completed - completed
jobs: jobs:
get-info:
name: "Get information about the source run"
runs-on: ubuntu-20.04
outputs:
pullRequestNumber: ${{ steps.source-run-info.outputs.pullRequestNumber }}
steps:
- name: "Get information about the origin 'CI' run"
uses: potiuk/get-workflow-origin@v1_3
id: source-run-info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
label-precommit: label-precommit:
name: Label pre-commit status name: Label pre-commit status
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
# if: ${{ github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event.workflow.name == 'Pre-commit consistency check' }}
needs:
- get-info
steps: steps:
- uses: getsentry/action-github-app-token@v1 - uses: getsentry/action-github-app-token@v1
id: get-app-token id: get-app-token