From 74567909b253cd7c77c9d1b847605b7e7d095cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Thu, 22 Aug 2024 14:28:54 -0700 Subject: [PATCH] fix: Migrates E2E reports to external repo (#16326) --- .github/workflows/cleanup.yml | 7 +++++++ .github/workflows/publish-report.yml | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 97f9f8d258..4f9135bee5 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -4,6 +4,11 @@ on: delete: branches-ignore: [main, gh-pages] +permissions: + contents: write + issues: write + pull-requests: write + # ensures that currently running Playwright workflow of deleted branch gets cancelled concurrency: group: ${{ github.event.ref }} @@ -20,7 +25,9 @@ jobs: - name: Checkout GitHub Pages Branch uses: actions/checkout@v2 with: + repository: calcom/test-results ref: gh-pages + token: ${{ secrets.GH_ACCESS_TOKEN }} - name: Set Git User # see: https://github.com/actions/checkout/issues/13#issuecomment-724415212 run: | diff --git a/.github/workflows/publish-report.yml b/.github/workflows/publish-report.yml index d11d22ddcb..4fd70503cd 100644 --- a/.github/workflows/publish-report.yml +++ b/.github/workflows/publish-report.yml @@ -16,7 +16,9 @@ jobs: - name: Checkout GitHub Pages Branch uses: actions/checkout@v4 with: + repository: calcom/test-results ref: gh-pages + token: ${{ secrets.GH_ACCESS_TOKEN }} - name: Set Git User # see: https://github.com/actions/checkout/issues/13#issuecomment-724415212 run: | @@ -65,7 +67,7 @@ jobs: - name: Output Report URL as Workflow Annotation id: url run: | - FULL_HTML_REPORT_URL=https://calcom.github.io/cal.com/$HTML_REPORT_URL_PATH + FULL_HTML_REPORT_URL=https://calcom.github.io/test-results/$HTML_REPORT_URL_PATH echo "::notice title=📋 Published Playwright Test Report::$FULL_HTML_REPORT_URL" echo "link=$FULL_HTML_REPORT_URL" >> $GITHUB_OUTPUT - name: Find Comment