From 2976b6428854b66c3ba4a96c14f91579c04916f0 Mon Sep 17 00:00:00 2001 From: luncliff Date: Tue, 11 Feb 2025 01:40:07 +0900 Subject: [PATCH] ci: create cleanup.yml --- .github/workflows/cleanup.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/cleanup.yml diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml new file mode 100644 index 00000000..aeeed90d --- /dev/null +++ b/.github/workflows/cleanup.yml @@ -0,0 +1,35 @@ +name: "Cleanup" + +on: + pull_request: + types: [closed] + +jobs: + clean-cache: + name: "Cleanup Cache" + runs-on: windows-latest + steps: + - uses: actions/checkout@v4.2.2 + - name: "Run gh-cleanup-cache.ps1" + run: | + ./scripts/gh-cleanup-cache.ps1 ` + -Branch ${{ github.event.pull_request.head.ref }} + shell: pwsh + + clean-runs: + name: "Cleanup Workflow Runs" + runs-on: windows-latest + steps: + - uses: actions/checkout@v4.2.2 + - name: "Run gh-cleanup-runs.ps1" + run: | + ./scripts/gh-cleanup-runs.ps1 ` + -Workflow "build.yml" ` + -Branch ${{ github.event.pull_request.head.ref }} + shell: pwsh + - name: "Run gh-cleanup-runs.ps1" + run: | + ./scripts/gh-cleanup-runs.ps1 ` + -Workflow "build-windows-hosted.yml" ` + -Branch ${{ github.event.pull_request.head.ref }} + shell: pwsh