Skip to content

Commit

Permalink
ci: create job to delete test reports on PR close
Browse files Browse the repository at this point in the history
This will remove the test report once the PR is closed
  • Loading branch information
DSil committed Feb 9, 2024
1 parent f793c4f commit 1582563
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/delete-test-reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Delete Test Report

on:
pull_request:
types: [closed]

env:
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}

jobs:
delete-report:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Node
uses: ./.github/actions/node

- name: Delete Report
run: |
echo "Deleting report for branch $BRANCH_NAME"
BRANCH_URL=$(echo ${BRANCH_NAME} | sed -e 's/[^a-zA-Z0-9]/-/g')
DOMAIN=https://kiwicom-orbit-test-report-${BRANCH_URL}.surge.sh
yarn surge teardown $DOMAIN --token ${{ secrets.SURGE_TOKEN }}
continue-on-error: true

0 comments on commit 1582563

Please sign in to comment.