Skip to content

Commit

Permalink
Merge pull request #14168 from krauselukas/fix/receive_pr_number_in_g…
Browse files Browse the repository at this point in the history
…h_action

Hand over PR number between gh action workflows through artifacts
  • Loading branch information
hennevogel committed Apr 17, 2023
2 parents 16efcec + 1d8bf5f commit 261b1c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/comment_diffend_io_links_to_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
with:
workflow: ${{ github.event.workflow_run.workflow_id }}
workflow_conclusion: success
- name: Fetch PR number from artifacts
run: |
echo "pr_number=$(cat comment_text_and_pr_number/pr_number.txt)" >> $GITHUB_ENV
- name: Add Comment to PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: comment_text/comment_text.txt
pr_number: ${{ github.event.workflow_run.pull_requests[0].number }}
filePath: comment_text_and_pr_number/comment_text.txt
pr_number: ${{ env.pr_number }}
5 changes: 3 additions & 2 deletions .github/workflows/create_diffend_io_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ jobs:
mkdir ./artifacts
echo "$COMMENT_TEXT" > ./artifacts/comment_text.txt
echo ${{ github.event.number }} > ./artifacts/pr_number.txt
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: comment_text
path: artifacts/comment_text.txt
name: comment_text_and_pr_number
path: artifacts/

0 comments on commit 261b1c3

Please sign in to comment.