42 lines
999 B
YAML
42 lines
999 B
YAML
name: Daily Feed Update
|
|
|
|
on:
|
|
schedule:
|
|
# Run daily at 1:00 AM UTC (adjust the time as needed)
|
|
- cron: '0 1 * * *'
|
|
workflow_dispatch:
|
|
# Allow manual triggering of the workflow
|
|
|
|
jobs:
|
|
update-feed:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- name: Cache Cargo dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Run recent feed update
|
|
run: cargo run -- --feed recent
|
|
|
|
- name: Commit and push results
|
|
run: |
|
|
git config user.name bpmcdevitt
|
|
git config user.email brendan@mcdevitt.tech
|
|
git add .
|
|
git commit -m "Update recent feed data" || exit 0
|
|
git push
|