From 7e80b3007d664ad294ca8ca7f02059babbd012de Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Fri, 14 Oct 2022 21:05:13 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Updated=20Regex=20for=20cleanup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 11 +++-------- .github/workflows/github-cleanup.yml | 20 ++++++++++++++++++++ 2 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/github-cleanup.yml 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]*'