Delete l10n_main Branch #1998
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete l10n_main Branch | |
# Crowdin doesn't do a good job of auto-cleaning it's branches, so we will delete it via an hourly cronjob | |
on: | |
schedule: | |
- cron: '0 */6 * * *' # Run every 6 hours | |
jobs: | |
delete: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Delete Branch | |
run: | | |
git fetch origin | |
exists=$(git ls-remote --heads origin l10n_main) | |
if [[ -z ${exists} ]]; then | |
echo "Branch does not exist" | |
exit 0 | |
else | |
echo "Branch does exist" | |
git push origin --delete l10n_main | |
fi |