The Bots #39000
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: "The Bots" | |
on: | |
# run it on every 7 minutes | |
schedule: | |
- cron: "*/7 * * * *" | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('**/rust-toolchain.toml') }} | |
- run: cargo build | |
- name: "Run for DPZ" | |
run: cargo run | |
env: | |
RSS_URL: https://dailyportalz.jp/feed/headline | |
BSKY_ID: ${{ secrets.BSKY_DBZ_BOT_ID }} | |
BSKY_PASSWORD: ${{ secrets.BSKY_DPZ_BOT_PASSWORD }} | |
MAX_BSKY_POSTS: 10 | |
- name: "Run for Gihyo.jp" | |
run: cargo run | |
env: | |
RSS_URL: https://gihyo.jp/feed/rss2 | |
BSKY_ID: ${{ secrets.BSKY_GIHYO_BOT_ID }} | |
BSKY_PASSWORD: ${{ secrets.BSKY_GIHYO_BOT_PASSWORD }} | |
MAX_BSKY_POSTS: 10 |