2024-10-25 11:14:17 +03:00
|
|
|
name: Update Repositories file
|
|
|
|
|
|
|
|
on:
|
2024-10-25 12:41:08 +03:00
|
|
|
workflow_dispatch:
|
2024-10-25 11:14:17 +03:00
|
|
|
schedule:
|
|
|
|
- cron: "0 0 1 * *"
|
2024-10-25 12:41:08 +03:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- scripts/fetchRepositories.ts
|
2024-10-25 11:14:17 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
update-repositories:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
OUTPUT_PATH: static/repositories.json
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
|
|
|
|
|
|
- name: Update repositories file
|
|
|
|
run: bun scripts/fetchRepositories.ts
|
|
|
|
|
|
|
|
- name: Commit and push changes
|
|
|
|
run: |
|
|
|
|
git config --local user.email "action@github.com"
|
|
|
|
git config --local user.name "GitHub Action"
|
|
|
|
git add $OUTPUT_PATH
|
|
|
|
git commit -m "Update $OUTPUT_PATH" || echo "No changes to commit"
|
|
|
|
git push
|