Skip to content

Commit

Permalink
dump13
Browse files Browse the repository at this point in the history
  • Loading branch information
tooomm committed Dec 4, 2022
1 parent 96ce2fa commit cb15609
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/check_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,36 @@ jobs:
with:
args: '--dump --exclude www.w3.org -- tokens.xml'
fail: true
jobSummary: false

- name: List duplicated image links
if: steps.tokens_pic_urls.outcome == 'success'
shell: bash
# Remove blank lines | trim trailing integers (Scryfall) | sort | count and list duplicates
run: |
grep . /tmp/lychee/out.md | sed 's/\.jpg?.*/.jpg/' | sort | uniq -cd
# Add link to results to summary
# Not possible yet due to missing job id number: https://github.community/t/get-action-job-id/17365
# echo "[:mirror: Duplicated Image Links]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/runs/JOB_ID#step:7:0)" >> $GITHUB_STEP_SUMMARY
- name: Image hosting statistics
- name: List image hosting sources
if: steps.tokens_pic_urls.outcome == 'success'
shell: bash
# Extract domains from URLs | remove blank lines | sort | count and list | sort descending
run: |
awk -F/ '{print $3}' /tmp/lychee/out.md | grep . | sort | uniq -c | sort -nr
# Add link to results to summary
# Not possible yet due to missing job id number: https://github.community/t/get-action-job-id/17365
# echo "[:bar_chart: Image Hosting Statistics]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/runs/JOB_ID#step:8:0)" >> $GITHUB_STEP_SUMMARY
- name: Check extracted URLs from tokens.xml
# Check already extracted URLs from tokens.xml
- name: Check URLs from tokens.xml
uses: lycheeverse/lychee-action@v1
if: always()
if: steps.tokens_pic_urls.outcome == 'success'
with:
args: '--no-progress --require-https --cache --max-cache-age 1h -- /tmp/lychee/out.md'
fail: true
jobSummary: true

# Extract and check URLs directly from challenge_tokens.xml
#- name: Check challenge_tokens.xml URLs
# uses: lycheeverse/lychee-action@v1
# if: always()
# with:
# args: '--no-progress --require-https --cache --max-cache-age 1h -- challenge_tokens.xml'
# fail: true
# jobSummary: true
- name: Check URLs from challenge_tokens.xml
uses: lycheeverse/lychee-action@v1
if: always()
with:
args: '--no-progress --require-https --cache --max-cache-age 1h -- challenge_tokens.xml'
fail: true
jobSummary: true

0 comments on commit cb15609

Please sign in to comment.