https://github.com/simeg/urlsup-action
Github Action to verify that links in your repo are up and available
https://github.com/simeg/urlsup-action
awesome-bot ci http links urls validation
Last synced: about 1 year ago
JSON representation
Github Action to verify that links in your repo are up and available
- Host: GitHub
- URL: https://github.com/simeg/urlsup-action
- Owner: simeg
- License: mit
- Created: 2020-12-30T17:49:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-12-31T07:17:05.000Z (over 5 years ago)
- Last Synced: 2025-03-01T18:18:56.040Z (about 1 year ago)
- Topics: awesome-bot, ci, http, links, urls, validation
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# urlsup-action
GitHub Action to check if URLs in your repo are up and available
## Usage
This is a GitHub Action to check if URLs in your repo are up and available
(HTTP status code == 200). It uses [`urlsup`](https://github.com/simeg/urlsup)
which is built in Rust and is very fast.
## Inputs
### `args`
**Required**. The args to be passed to
[`urlsup`](https://github.com/simeg/urlsup).
## Example action workflow
```yaml
name: Validate that links are up
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Required for urlsup
# This step writes the files with URLs to the env variable $FILES_TO_CHECK to be used for the later step
- name: Find files with links
shell: bash
run: |
echo 'FILES_TO_CHECK<> $GITHUB_ENV
# --- This is where we define what files to check ---
# $GITHUB_WORKSPACE is where our files live
# Ignore dirs and only include markdown files
files_to_check=$(find $GITHUB_WORKSPACE -type f \
-not -path '*/\.git/*' -not -path '*/\.github/*' \
-name "*.md")
echo $files_to_check >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Validate that links are up
uses: simeg/urlsup-action@v1.0.0
with:
# Pass the files and any additional arguments to urlsup
args: ${{ env.FILES_TO_CHECK }} --threads 10 --allow 429 --white-list http://localhost
```