17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 00:29:19 +02:00
Files
maszyna/.github/workflows/build_cleanup.yml

22 lines
550 B
YAML

name: Remove public build of a deleted branch
on:
delete:
permissions:
contents: write
jobs:
cleanup:
if: github.event.ref_type == 'branch'
runs-on: ubuntu-24.04
steps:
- name: Delete the rolling release of the branch
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
BRANCH: ${{ github.event.ref }}
run: |
slug="$(printf '%s' "$BRANCH" | tr '/ ' '--' | tr -cd '[:alnum:]._-')"
gh release delete "build-$slug" --yes --cleanup-tag || true