1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #5879 from thornbill/publish-ci-pr-number

Add PR number to environment for debugging workflow
This commit is contained in:
Bill Thornton 2024-08-05 14:56:07 -04:00 committed by GitHub
commit a771246378
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,9 +25,18 @@ jobs:
&& github.event.workflow_run.head_branch
|| format('{0}/{1}', github.event.workflow_run.head_repository.full_name, github.event.workflow_run.head_branch)
}}
EVENT: ${{ github.event.workflow_run.event }}
PR_NUMBER: |
${{
github.event.workflow_run.event == 'pull_request'
&& github.event.workflow_run.pull_requests[0] != null
&& github.event.workflow_run.pull_requests[0].number
|| ''
}}
outputs:
url: ${{ steps.cf.outputs.url }}
branch: ${{ env.TARGET_BRANCH }}
pr_number: ${{ env.PR_NUMBER }}
steps:
- name: Download workflow artifact
@ -67,11 +76,11 @@ jobs:
name: Create comment status
if: |
always() &&
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.pull_requests[0].number != ''
needs.publish.outputs.pr_number != ''
runs-on: ubuntu-latest
needs:
- compose-comment
- publish
steps:
- name: Update job summary in PR comment
@ -79,6 +88,6 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }}
message: ${{ needs.compose-comment.outputs.msg }}
pr_number: ${{ github.event.workflow_run.pull_requests[0].number }}
pr_number: ${{ needs.publish.outputs.pr_number }}
comment_tag: ${{ needs.compose-comment.outputs.marker }}
mode: recreate