Skip to content

CI/CD

CI/CD #718

Workflow file for this run

name: CI/CD
on:
push:
branches: [main]
paths: [.github/workflows/ci-cd.yml]
workflow_dispatch:
schedule:
- cron: '30 09 * * *'
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
clean-actions-runs:
name: Clean stale workflow runs
runs-on: ubuntu-latest
strategy:
matrix:
include:
- workflow: CI/CD
- workflow: WinGet Automation
- workflow: Dependabot Updates
steps:
- name: 🧹 Cleanup 🫧🪥🧼🧽
run: |
$ErrorActionPreference = 'SilentlyContinue'
gh run list --workflow '${{ matrix.workflow }}' --limit 100 --status completed --json databaseId `
--repo vedantmgoyal9/vedantmgoyal9 | ConvertFrom-Json | ForEach-Object { `
gh run delete $_.databaseId --repo vedantmgoyal9/vedantmgoyal9 `
}
Exit 0 # Don't fail the job if there are no runs to delete
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }}