mirror of
https://github.com/Cockatrice/Magic-Token.git
synced 2026-03-30 22:05:24 -05:00
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Picture Health
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/check_links.yml'
|
|
- '**.xml'
|
|
pull_request:
|
|
branches: [ master ]
|
|
paths:
|
|
- '.github/workflows/check_links.yml'
|
|
- '**.xml'
|
|
workflow_dispatch:
|
|
schedule:
|
|
# Runs at the start of each month (UTC)
|
|
- cron: '0 0 1 * *'
|
|
|
|
jobs:
|
|
check_urls:
|
|
# Do not run the scheduled workflow on forks
|
|
if: ( github.event_name != 'schedule' || github.repository_owner == 'Cockatrice' )
|
|
|
|
name: Check image links
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
lychee_args: '--no-progress --require-https --cache --max-cache-age 8h --exclude http://www.w3.org'
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# Restore cache
|
|
- name: Restore lychee cache
|
|
id: restore-cache
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: .lycheecache
|
|
key: cache-lychee-${{ github.sha }}
|
|
restore-keys: cache-lychee-
|
|
|
|
# Extract and check URLs directly from token files
|
|
- name: Check token art URLs
|
|
uses: lycheeverse/lychee-action@v2
|
|
with:
|
|
args: '${{env.lychee_args}} -- tokens.xml'
|
|
jobSummary: true
|
|
|
|
# Always save cache
|
|
- name: Save lychee cache
|
|
uses: actions/cache/save@v4
|
|
if: always()
|
|
with:
|
|
path: .lycheecache
|
|
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
|