Skip to content

branch-cleanup

branch-cleanup #209

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 documentation
do
repo=koinos-proto-$lang
git clone https://[email protected]/koinos/`echo $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/`echo $repo`.git --delete ${{ github.event.ref }}
fi
popd
done
git clone https//[email protected]/koinos/koinos-openapi.git
pushd koinos-openapi
exists_in_remote=$(git ls-remote --heads origin ${{ github.event.ref }})
if [[ ${exists_in_remote} ]]; then
git push https://[email protected]/koinos/koinos-openapi.git --delete ${{ github.event.ref }}
fi
popd