diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index 699de30..0fbf7ae 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -89,11 +89,6 @@ jobs: name: GitHub Cleanup if: ${{ inputs.CLEANUP }} needs: [ upload-to-telegram ] - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - name: Delete Older Releases - uses: nikhilbadyal/ghaction-rm-releases@v0.0.2 - with: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - RELEASE_PATTERN: '*' + uses: ./.github/workflows/github-cleanup.yml + secrets: + GH_TOKEN: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/github-cleanup.yml b/.github/workflows/github-cleanup.yml new file mode 100644 index 0000000..aa8073e --- /dev/null +++ b/.github/workflows/github-cleanup.yml @@ -0,0 +1,20 @@ +name: GitHub Cleanup + +on: + workflow_dispatch: + workflow_call: + secrets: + GH_TOKEN: + required: true + +jobs: + github-cleanup: + name: GitHub Cleanup + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - name: Delete Older Releases + uses: nikhilbadyal/ghaction-rm-releases@v0.0.2 + with: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + RELEASE_PATTERN: '[\s\S]*'