Skip to content

Trim old reports

Trim old reports #43

Workflow file for this run

name: Trim old reports
on:
push:
branches:
# So that we can test this action easily:
- "**/*trim-action*"
workflow_dispatch:
schedule:
# Run at 3:03am on the 3rd of the month
- cron: "3 3 3 * *"
defaults:
run:
shell: bash
jobs:
trim:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Remove old reports
run: |
ls -1d reports/$(date -d "7 months ago" +%Y%m)* | xargs git rm -r
git config user.name 'Ned Batchelder'
git config user.email 'ned@nedbatchelder.com'
git commit -m 'trim reports older than six months'
git push