Skip to content

Remove deleted branch from launchermeta #544

Remove deleted branch from launchermeta

Remove deleted branch from launchermeta #544

name: Remove deleted branch from launchermeta
on:
delete:
jobs:
remove_deleted_branch:
runs-on: ubuntu-latest
name: Remove deleted branch
if: github.event.ref_type == 'branch'
steps:
- name: Setup ssh agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Delete branch from launchermeta
run: |
# init git configuration
git config --global user.name "CloudNetAutomation";
git config --global user.email "[email protected]";
# clone the repo from the remote, without objects (partial clone)
git clone --filter=blob:none --no-checkout [email protected]:CloudNetService/launchermeta.git del_temp;
# navigate into the cloned repo and remove the delete branch (while ignoring all errors)
cd del_temp;
git push origin --delete "${{ github.event.ref }}" || true;