Skip to content

Update urlcheck.yml #10

Update urlcheck.yml

Update urlcheck.yml #10

Workflow file for this run

on:
push:
branches: [hrm_test]
pull_request:
branches: [hrm_test]
# release:
# types: [published]
workflow_dispatch:
name: Check URLs
jobs:
build:
runs-on: ubuntu-latest
steps:
name: Checkout repository
uses: actions/checkout@v3
name: Install dependencies

Check failure on line 21 in .github/workflows/urlcheck.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/urlcheck.yml

Invalid workflow file

You have an error in your yaml syntax on line 21
run: sudo apt-get install -y curl
name: Find and check URLs
run: |
grep -Eo '(http|https)://[^/"]+' -r . | while read -r url; do
if ! curl --output /dev/null --silent --head --fail "$url"; then
echo "Broken URL: $url"
exit 1
fi
done