]> Nishi Git Mirror - gwion.git/commitdiff
:wrench: Delete obsolete branch
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Thu, 20 Feb 2020 21:35:58 +0000 (22:35 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Thu, 20 Feb 2020 21:35:58 +0000 (22:35 +0100)
.github/workflows/delete.yml [new file with mode: 0644]

diff --git a/.github/workflows/delete.yml b/.github/workflows/delete.yml
new file mode 100644 (file)
index 0000000..7bbf25a
--- /dev/null
@@ -0,0 +1,20 @@
+name: Coverage Report
+
+on: [ delete ]
+
+jobs:
+  name: Delete obsolete branch
+  build:
+    runs-on: ubuntu-latest
+    if: "startsWith(github.event.ref, 'refs/heads/')"
+
+    - name: Clone report repo
+      run: |
+        git clone https://github.com/fennecdjay/gwion-coverage-report
+        cd gwion-coverage-report
+        branch=$(basename ${{ github.event.ref }})
+        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/fennecdjay/gwion-coverage-report.git
+        git add html && git commit -m "Delete obsolete branch" && git subtree push --prefix html origin gh-pages || true