Use docker container for link check
This commit is contained in:
parent
a718c89e07
commit
604acd36d1
|
@ -1,25 +0,0 @@
|
|||
name: linkcheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
linkcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: set up python 3
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
cache: 'pip'
|
||||
|
||||
- name: install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Verify links
|
||||
run: python linkcheck.py
|
|
@ -0,0 +1,16 @@
|
|||
name: linkcheck
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
linkcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Verify links
|
||||
run: bash ci/docker-linkcheck.sh
|
|
@ -0,0 +1,16 @@
|
|||
#! /bin/bash
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
set -x
|
||||
|
||||
this_dir="$(readlink -f -- "$(dirname -- "${BASH_SOURCE[0]}")")"
|
||||
image="python:3-alpine"
|
||||
|
||||
# as we use a pipe to stdin and thus cannot use -it, Ctrl-C does not work by default
|
||||
# turns out that combining -i with --init solves that problem
|
||||
# see https://stackoverflow.com/a/60812082
|
||||
docker run --rm -i -v "$this_dir"/..:/ws -w /ws --init "$image" sh <<\EOF
|
||||
pip install -r requirements.txt
|
||||
python linkcheck.py
|
||||
EOF
|
Loading…
Reference in New Issue