Skip to content

Run Tests

Run Tests #126

Workflow file for this run

name: Run Tests
on:
schedule:
- cron: '0 16 */1 * *'
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: compare versions
run: |
export REMOTEVERSION=$(wget -qO- https://api.github.com/repos/alist-org/alist/tags | gawk -F '["v]' '/name/{print "v"$5;exit}')
export LOCALVERSION=$(curl --location --silent --fail --show-error "https://api.github.com/repos/ansoncloud8/am-alist-freebsd/releases/latest" | grep -oP '"tag_name":\s*"\K[^"]+')
bash compare.sh
- name: Trigger release
if: ${{ env.SYNCED == 0 }}
uses: actions/github-script@v6
with:
github-token: ${{ secrets.PAT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'ansoncloud8',
repo: 'am-alist-freebsd',
workflow_id: 'build.yml',
ref: 'main'
})
- name: Delete workflow runs
if: ${{ env.SYNCED == 1 }}
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 1
keep_minimum_runs: 8