Skip to content

Commit

Permalink
Add ability to check links.
Browse files Browse the repository at this point in the history
Signed-off-by: Gerd Zellweger <[email protected]>
  • Loading branch information
gz committed Sep 24, 2024
1 parent d31d076 commit 59b6f8e
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/check-failures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Notify Failures To Slack
on:
workflow_run:
workflows: ['Link Checker']
types: [completed]
branches: [main]

jobs:
on-failure:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'timed_out'
steps:
- uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ github.event.workflow_run.conclusion }}
notification_title: " ${{github.event.workflow_run.name}} - ${{github.event.workflow_run.conclusion}} on ${{github.event.workflow_run.head_branch}} - <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
message_format: ":fire: *${{github.event.workflow_run.name}}* ${{github.event.workflow_run.conclusion}} in <${{github.server_url}}/${{github.repository}}/tree/${{github.event.workflow_run.head_branch}}|${{github.repository}}>"
footer: "Linked Repo <${{github.server_url}}/${{github.repository}}|${{github.repository}}> | <${{github.server_url}}/${{github.repository}}/actions/runs/${{github.event.workflow_run.id}}|View Failure>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.CI_FAILURE_TO_SLACK_WEBHOOK }}
26 changes: 26 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Link Checker

on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
linkcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install the default version of uv
id: setup-uv
uses: astral-sh/setup-uv@v2

- name: Check links on feldera.com
run: |
uv run --locked linkchecker https://feldera.com --check-extern --no-status
- name: Check links on docs.feldera.com
run: |
uv run --locked linkchecker https://docs.feldera.com --check-extern --no-status
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
Loading

0 comments on commit 59b6f8e

Please sign in to comment.