CI: Check image links (#131)

This commit is contained in:
tooomm 2022-09-12 14:13:36 +02:00 committed by GitHub
parent 6ce8f96a55
commit cb37bdf540
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 1 deletions

48
.github/workflows/check_links.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: Picture Health
on:
pull_request:
# Default events are opened, synchronized or reopened
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
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
# Extract and check URLs directly from tokens.xml
- name: Check tokens.xml URLs
uses: lycheeverse/lychee-action@v1.5.1
if: always()
continue-on-error: true
with:
args: '--no-progress --require-https --cache --max-cache-age 1h -- tokens.xml'
fail: true
jobSummary: true
# Extract and check URLs directly from challenge_tokens.xml
- name: Check challenge_tokens.xml URLs
uses: lycheeverse/lychee-action@v1.5.1
if: always()
continue-on-error: true
with:
args: '--no-progress --require-https --cache --max-cache-age 1h -- challenge_tokens.xml'
fail: true
jobSummary: true

View File

@ -1,6 +1,6 @@
[![Discord](https://img.shields.io/discord/314987288398659595?label=Discord&logo=discord&logoColor=white)](https://discord.gg/3Z9yzmA) [![Gitter Chat](https://img.shields.io/gitter/room/Cockatrice/Magic-Spoiler)](https://gitter.im/Cockatrice/Magic-Spoiler)
Magic-Token [![](https://img.shields.io/badge/dynamic/xml.svg?label=version&url=https%3A%2F%2Fraw.githubusercontent.com%2FCockatrice%2FMagic-Token%2Fmaster%2Ftokens.xml&query=%2F%2FsourceVersion)](https://github.com/Cockatrice/Magic-Token/blob/master/tokens.xml)
Magic-Token [![](https://img.shields.io/badge/dynamic/xml.svg?label=version&url=https%3A%2F%2Fraw.githubusercontent.com%2FCockatrice%2FMagic-Token%2Fmaster%2Ftokens.xml&query=%2F%2FsourceVersion)](https://github.com/Cockatrice/Magic-Token/blob/master/tokens.xml) [![Picture Health](https://github.com/Cockatrice/Magic-Token/actions/workflows/check_links.yml/badge.svg?branch=master)](https://github.com/Cockatrice/Magic-Token/actions/workflows/check_links.yml?query=branch%3Amaster)
=================
This repo contains token information in [Cockatrice](https://github.com/cockatrice/cockatrice)'s [XML card database format](https://github.com/Cockatrice/Cockatrice/wiki/Custom-Cards-&-Sets#to-add-your-own-custom-cards-follow-these-steps) for Magic: The Gathering.<br />