Skip to content

branch-cleanup

branch-cleanup #211

name: branch-cleanup
on: [delete]
jobs:
branch_cleanup:
if: github.event.ref_type == 'branch'
runs-on: ubuntu-latest
env:
KOINOS_CI_TOKEN: ${{ secrets.KOINOS_CI_TOKEN }}
steps:
- run: |
for lang in cpp golang js python embedded-cpp descriptors as
do
repo=koinos-proto-$lang
git clone https://[email protected]/koinos/${repo}.git
pushd $repo
exists_in_remote=$(git ls-remote --heads origin ${{ github.event.ref }})
if [[ ${exists_in_remote} ]]; then
git push https://[email protected]/koinos/${repo}.git --delete ${{ github.event.ref }}
fi
popd
done