Check Last Updated Timestamps #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Last Updated Timestamps | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' # Runs every Sunday at midnight | |
jobs: | |
check_last_updated: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Check last updated timestamps | |
id: check | |
run: | | |
python scripts/check_last_updated.py > output.log | |
- name: Create issue if outdated | |
if: steps.check.outcome == 'failure' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const fs = require('fs'); | |
const output = fs.readFileSync('output.log', 'utf8'); | |
github.issues.create({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
title: 'Outdated Timestamps Detected', | |
body: output | |
}) |