-
Notifications
You must be signed in to change notification settings - Fork 12
47 lines (39 loc) · 1.28 KB
/
auto-update.yml
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
38
39
40
41
42
43
44
45
46
47
name: auto update
on:
schedule:
- cron: "0 */12 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
auto-update:
runs-on: ubuntu-latest
steps:
- name: Install libvips
run: |
sudo apt-get update
sudo apt-get install -y libvips libvips-dev
- name: Install uso-archive binary
uses: baptiste0928/cargo-install@v2
with:
crate: uso-archive
git: https://code.pepega.club/uso-archive/updater.git
branch: main
- name: Checkout
uses: actions/checkout@v3
- name: Update
run: |
uso-archive fetch-ids --sorting updated --until-time "$(cat ./data/last-update.txt)" /tmp/ids.json
date -uIs > ./data/last-update.txt
uso-archive download /tmp/ids.json ./data
uso-archive index ./data ./data/search-index.json
- name: Commmit & Push
run: |
git config user.name 'uso-archive[bot]'
git config user.email '137587018+uso-archive[bot]@users.noreply.github.com'
git add data
uso-archive git-commit-msg ./data /tmp/ids.json | git commit -F -
git rev-parse HEAD > ./data/last-commit.txt
git add data
git commit -m "[*] update last-commit"
git push