-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (35 loc) · 1.02 KB
/
regenerate.yml
File metadata and controls
37 lines (35 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Regenerate profile README.md
on:
push:
branches:
- master
schedule:
- cron: "33 4 * * *"
jobs:
generate:
runs-on: ubuntu-latest
environment: "Profile regeneration"
steps:
- uses: actions/checkout@v6
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cargo build
run: |
cargo build
- name: Configure Git
run: |
git config --global user.email "murderbot@example.com"
git config --global user.name "Murderbot"
- name: Run generator
run: |
set -e
set -x
RUST_LOG=debug GITHUB_TOKEN=${{ github.token }} LAST_FM_API_KEY=${{ secrets.LAST_FM_API_KEY }} ./target/debug/generator
- name: Commit and push if changed
run: |
if [[ `git status --porcelain` ]]; then
git commit -a -m 'Regenerated profile README.md'
git push
fi