Skip to content

PR #10 [closed, true] #3

PR #10 [closed, true]

PR #10 [closed, true] #3

name: Pull Request (Closed)
run-name: |
PR #${{github.event_name == 'pull_request' && github.event.pull_request.number || inputs.pr-number}} [closed, ${{github.event_name == 'pull_request' && (github.event.pull_request.merged && 'merged' || 'rejected') || inputs.pr-merged }}] ${{github.event_name == 'pull_request' && github.event.pull_request.title || ''}}
on:
pull_request:
types:
- closed
workflow_dispatch:
inputs:
pr-number:
description: "PR #"
type: number
required: true
pr-merged:
description: "Whether the PR was merged or not"
type: boolean
default: false
concurrency:
group: pr-closed-${{ github.ref }}
cancel-in-progress: false
permissions:
actions: write
packages: read
jobs:
cleanup_jobs:
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: |
src/uno/scripts/cleanup_closed_pull_request.sh \
${{ github.repository }} \
${{ github.event_name == 'pull_request' && github.event.pull_request.number || inputs.pr-number }} \
${{ github.event_name == 'pull_request' && github.event.pull_request.merged || inputs.pr-merged }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADMIN_IMAGE: ghcr.io/mentalsmash/uno-ci-admin:latest