Skip to content

Purge Deprecated Workflow Runs #28

Purge Deprecated Workflow Runs

Purge Deprecated Workflow Runs #28

name: Purge Deprecated Workflow Runs
on:
workflow_dispatch:
schedule:
- cron: '46 3 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
purge-obsolete-workflows:
name: Purge Deprecated Workflow Runs
permissions:
actions: write
runs-on: ubuntu-latest
steps:
- name: Purge Deprecated Workflow Runs
uses: otto-de/purge-deprecated-workflow-runs@444ef393e03e89bc044fee35d26fb9c474ffe4ad # v 2.1.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
remove-obsolete: true
remove-cancelled: true
remove-failed: true
remove-skipped: true
slack-workflow-status:
if: always()
name: Slack Post Workflow Notification
needs:
- purge-obsolete-workflows
runs-on: ubuntu-latest
steps:
- name: Slack Workflow Notifications
if: ${{ github.event_name == 'schedule' && needs.purge-obsolete-workflows.result != 'success'}}
uses: Gamesight/slack-workflow-status@68bf00d0dbdbcb206c278399aa1ef6c14f74347a # v1.3.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
include_jobs: on-failure
include_commit_message: true