diff --git a/.github/workflows/preview-teardown.yml b/.github/workflows/preview-teardown.yml
index 7a470e4c9ca..8d444203412 100644
--- a/.github/workflows/preview-teardown.yml
+++ b/.github/workflows/preview-teardown.yml
@@ -12,12 +12,12 @@ jobs:
id: deploy
run: npx surge teardown https://quarkus-site-pr-${{ github.event.number }}-preview.surge.sh --token ${{ secrets.SURGE_TOKEN }} || echo "NOT_TORNDOWN=true" >> "$GITHUB_ENV"
- name: Update PR status comment
- uses: actions-cool/maintain-one-comment@v3.2.0
+ uses: quarkusio/action-helpers@main
if: env.NOT_TORNDOWN != 'true'
with:
- token: ${{ secrets.GITHUB_TOKEN }}
+ action: maintain-one-comment
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ pr-number: ${{ github.event.number }}
body: |
🙈 The PR is closed and the preview is expired.
-
- body-include: ''
- number: ${{ github.event.number }}
+ body-marker:
diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml
index 187b60ff718..385703abefa 100644
--- a/.github/workflows/preview.yml
+++ b/.github/workflows/preview.yml
@@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
actions: read
- # needed to maintain comments
issues: write
+ # this is unfortunately needed to be able to write comments on pull requests
pull-requests: write
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
steps:
@@ -37,10 +37,13 @@ jobs:
run: npx surge ./ --domain https://quarkus-site-pr-${PR_ID}-preview.surge.sh --token ${{ secrets.SURGE_TOKEN }}
env:
PR_ID: ${{ steps.pr.outputs.id }}
+
- name: Update PR status comment on success
- uses: actions-cool/maintain-one-comment@v3.2.0
+ uses: quarkusio/action-helpers@main
with:
- token: ${{ secrets.GITHUB_TOKEN }}
+ action: maintain-one-comment
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ pr-number: ${{ steps.pr.outputs.id }}
body: |
🎊 PR Preview ${{ github.sha }} has been successfully built and deployed to https://quarkus-site-pr-${{ steps.pr.outputs.id }}-preview.surge.sh
@@ -48,17 +51,15 @@ jobs:
- Newsletters older than 3 months are not available.
-
- body-include: ''
- number: ${{ steps.pr.outputs.id }}
+ body-marker:
- name: Update PR status comment on failure
+ uses: quarkusio/action-helpers@main
if: ${{ failure() }}
- uses: actions-cool/maintain-one-comment@v3.2.0
with:
- token: ${{ secrets.GITHUB_TOKEN }}
+ action: maintain-one-comment
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ pr-number: ${{ steps.pr.outputs.id }}
body: |
😠Deploy PR Preview failed.
-
- body-include: ''
- number: ${{ steps.pr.outputs.id }}
+ body-marker: