Links on live #444
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Links on live | |
on: | |
schedule: | |
- cron: "20 7 * * *" | |
jobs: | |
check-links: | |
if: github.repository == 'canonical/ubuntu.com' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install linkchecker | |
run: sudo pip install LinkChecker | |
- name: Write linkchecker config file | |
run: | | |
mkdir -p ~/.linkchecker | |
cat > ~/.linkchecker/linkcheckerrc <<EOF | |
[checking] | |
maxrequestspersecond=5 | |
recursionlevel=2 | |
timeout=1000 | |
sslverify=0 | |
[filtering] | |
checkextern=1 | |
ignore= | |
https://res.cloudinary.com | |
q_auto | |
fl_sanitize | |
c_fill | |
e_sharpen | |
w_[0-9]* | |
h_[0-9]* | |
https://ubuntu.com/blog | |
https://ubuntu.com/security | |
http://www.brendangregg.com | |
http://www.adlinktech.com/en/index | |
/flags.png | |
/[email protected] | |
[output] | |
status=0 | |
warnings=0 | |
EOF | |
- name: Run linkchecker | |
run: | | |
linkchecker https://ubuntu.com | |
- name: Send message on failure | |
if: failure() | |
run: curl -X POST -F "workflow=${GITHUB_WORKFLOW}" -F "repo_name=${GITHUB_REPOSITORY}" -F "action_id=${GITHUB_RUN_ID}" ${{ secrets.BOT_URL }}?room=web--design |