Update List Data #68
This file contains hidden or 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: Update List Data | |
| on: | |
| schedule: | |
| - cron: '0 12 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| update-data: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Fetch list and save to data/list.json | |
| run: | | |
| # Create data directory if it doesn't exist | |
| mkdir -p data | |
| # Fetch raw JSON and save it directly | |
| curl -sSf https://raw.githubusercontent.com/kebab-os/list/refs/heads/main/list.json -o data/list.json | |
| # Validate JSON | |
| python3 -c "import json; json.load(open('data/list.json'))" | |
| - name: Commit and push changes | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add data/list.json | |
| git diff --cached --quiet || git commit -m "chore: update list data" | |
| git push | |