Update csv #5
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: check kb_urls | |
on: | |
push: | |
paths: | |
- .github/workflows/check_urls.yml | |
- "server/kb_urls.csv" | |
pull_request: | |
paths: | |
- .github/workflows/check_urls.yml | |
- "server/kb_urls.csv" | |
jobs: | |
url-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Prepare url file | |
run: | | |
set -e | |
if [[ $GITHUB_REF_NAME == "main" ]]; then | |
git diff -c HEAD^ -- server/kb_urls.csv | | |
grep "+https" | cut -d ',' -f1 | | |
sed 's/ +//g' >kb_urls.txt | |
else | |
git diff -c origin/main -- server/kb_urls.csv | | |
grep "+https" | cut -d ',' -f1 | | |
sed 's/ +//g' >kb_urls.txt | |
fi | |
- name: Link Checker | |
uses: lycheeverse/lychee-action@v1 | |
with: | |
args: --verbose --timeout 20 --no-progress kb_urls.txt | |
fail: true |