From c0ae019bca625c0689f49123c53a54f7e046ccfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=E1=B4=87=CA=80=C9=B4=E1=B4=85=20S=E1=B4=84=CA=9C?= =?UTF-8?q?=E1=B4=8F=CA=80=C9=A2=E1=B4=87=CA=80s?= Date: Sat, 24 Jul 2021 13:21:25 +0200 Subject: [PATCH] ci: Add source run info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs --- .../workflows/metadata-label-pr-ci-status.yaml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/metadata-label-pr-ci-status.yaml b/.github/workflows/metadata-label-pr-ci-status.yaml index f286cda3..26aa3aca 100644 --- a/.github/workflows/metadata-label-pr-ci-status.yaml +++ b/.github/workflows/metadata-label-pr-ci-status.yaml @@ -9,10 +9,25 @@ on: - completed 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: name: Label pre-commit status 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: - uses: getsentry/action-github-app-token@v1 id: get-app-token