Skip to content

Delete Obsolete Coverage Report #1582

Delete Obsolete Coverage Report

Delete Obsolete Coverage Report #1582

Workflow file for this run

name: Delete Obsolete Coverage Report
on:
delete:
branches:
- '**'
- '!gh-pages'
jobs:
build:
runs-on: ubuntu-latest
if: "startsWith(github.event.ref_type, 'branch')"
steps:
- name: Clone report repo
run: |
git clone https://github.com/Gwion/gwion-coverage-report
cd gwion-coverage-report
branch=${{ github.event.ref }}
if [ -d html/$branch ]
then
rm -r html/$branch
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git remote set-url origin https://${{ secrets.COVERAGE_TOKEN }}@github.com/Gwion/gwion-coverage-report.git
git add html
git commit -m "Delete obsolete branch"
git subtree push --prefix html origin gh-pages
fi