-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2636e21
commit 873cd26
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,3 +57,27 @@ jobs: | |
- name: Get the preview_url | ||
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}" | ||
- name: Store PR id as variable | ||
id: pr | ||
run: | | ||
echo "id=$(<pr-id.txt)" >> $GITHUB_OUTPUT | ||
rm -f pr-id.txt | ||
- name: Update PR status comment on success | ||
uses: actions-cool/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: | | ||
📖 PR Preview ${{ github.sha }} has been successfully built and deployed to https://${{ steps.preview_step.outputs.preview_url }} | ||
<!-- Sticky Pull Request Comment --> | ||
body-include: '<!-- Sticky Pull Request Comment -->' | ||
number: ${{ steps.pr.outputs.id }} | ||
- name: Update PR status comment on failure | ||
if: ${{ failure() }} | ||
uses: actions-cool/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: | | ||
📓 💔 Deploy PR Preview failed. | ||
<!-- Sticky Pull Request Comment --> | ||
body-include: '<!-- Sticky Pull Request Comment -->' | ||
number: ${{ steps.pr.outputs.id }} |