Skip to content

auto update

auto update #2004

Workflow file for this run

name: auto update
on:
schedule:
- cron: "0 0 * * *"
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
run: |
set -xe
sudo curl -o /usr/local/bin/uso-archive 'https://code.pepega.club/uso-archive/updater-release/releases/download/latest/uso-archive'
sudo chmod +x /usr/local/bin/uso-archive
which uso-archive
- name: Fetch updated IDs
run: |
set -e
date -uIs >/tmp/last-update.txt
uso-archive fetch-ids --until-time "$(curl 'https://raw.githubusercontent.com/uso-archive/data/flomaster/data/last-update.txt')" /tmp/ids.json
- name: Checkout
uses: actions/checkout@v3
- name: Download & Index
run: |
set -xe
cp /tmp/last-update.txt ./data/last-update.txt
uso-archive download /tmp/ids.json ./data
uso-archive index ./data ./data/search-index.json >/tmp/index.log || cat /tmp/index.log
- name: Commmit & Push
run: |
set -xe
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