Skip to content

Commit

Permalink
Add a daily prune event
Browse files Browse the repository at this point in the history
  • Loading branch information
msadowski committed Nov 5, 2023
1 parent 1b27413 commit 27ddf58
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/daily_prune.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Daily Prune

on:
schedule:
- cron: '0 0 * * *' # Executes the script every day at 00:00 UTC
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip3 install ruamel.yaml
- name: Run Python script
run: python scripts/clean_events.py

- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "Update event files")
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 27ddf58

Please sign in to comment.