mirror of
https://github.com/multipleof4/lynchmark.git
synced 2026-03-17 03:11:01 +00:00
Feat: Action to trigger stale output cleanup
This commit is contained in:
31
.github/workflows/cleanup-stale-outputs.yml
vendored
Normal file
31
.github/workflows/cleanup-stale-outputs.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
name: Cleanup Stale Outputs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'README'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cleanup:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Run cleanup script
|
||||||
|
run: node scripts/cleanup-outputs.js
|
||||||
|
|
||||||
|
- name: Commit and push if changed
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'github-actions[bot]'
|
||||||
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
git add tests
|
||||||
|
git diff --staged --quiet || (git commit -m "Refactor: Remove stale benchmark outputs" && git push)
|
||||||
Reference in New Issue
Block a user