Skip to content

daily run

daily run #51

Workflow file for this run

name: daily run
on:
workflow_dispatch:
schedule:
- cron: "0 13 * * *"
jobs:
build-and-execute:
environment: user
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Install rust default
run: rustup update stable && rustup default stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: ". -> target"
- name: Build
run: |
cd cli
cargo build --release
env:
BACKEND: ${{ secrets.BACKEND }}
- name: Execute
run: |
RANDOM_SEC=$((RANDOM % 14400))
TIME="$(TZ="Asia/Shanghai" date -d "-$RANDOM_SEC seconds" +"%Y-%m-%d %H:%M:%S")"
./target/release/cli \
-u "${{ secrets.USERNAME }}" \
-p "${{ secrets.PASSWORD }}" \
-m 5 \
-r ./assets/map.geojson \
-t "$TIME"