Delete l10n_main Branch #4534
This file contains hidden or 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 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - 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 |