-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Nightly cleanup * More resiliant PR handling * Only run release cleanup on successful runs
- Loading branch information
Showing
4 changed files
with
200 additions
and
66 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Release (Cleanup) | ||
run-name: | | ||
release cleanup [${{github.ref_type == 'tag' && 'stable' || 'nightly' }}, ${{github.ref_name}}] | ||
on: | ||
workflow_dispatch: | ||
|
||
workflow_run: | ||
workflows: ["Release"] | ||
types: [completed] | ||
|
||
concurrency: | ||
group: release-cleanup-${{ github.ref }} | ||
cancel-in-progress: false | ||
|
||
permissions: | ||
actions: write | ||
packages: read | ||
|
||
jobs: | ||
cleanup_jobs: | ||
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Clone uno | ||
uses: actions/checkout@v4 | ||
with: | ||
path: src/uno | ||
submodules: true | ||
|
||
- name: Log in to GitHub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Clean up workflow runs" | ||
run: | | ||
docker run --rm \ | ||
-v $(pwd):/workspace \ | ||
-e GH_TOKEN=${GH_TOKEN} \ | ||
-w /workspace \ | ||
${ADMIN_IMAGE} \ | ||
src/uno/scripts/ci-admin nightly-cleanup \ | ||
-r ${{ github.repository }} | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ADMIN_IMAGE: ghcr.io/mentalsmash/uno-ci-admin:latest | ||
|
Oops, something went wrong.