Skip to content

chore(deps): update all github action dependencies (main) #2709

chore(deps): update all github action dependencies (main)

chore(deps): update all github action dependencies (main) #2709

Workflow file for this run

name: Check docs links
on:
pull_request:
paths:
- 'README.md'
- 'docs/content/**.md'
- '.github/lychee.toml'
- '.github/workflows/check-links-pr.yaml'
branches:
- 'main'
jobs:
links-checker:
runs-on: ubuntu-latest
permissions: {} # lychee uses the GITHUB_TOKEN for authentication only
env:
PATCH_FILE: "additions.patch"
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@75d2e84710de30f6ff7268e08f310b60ef14033f # v3.0.0
with:
hugo-version: '0.126.2'
extended: true
- name: Retrieve additions and replace GitHub main links with local branch
shell: bash
env:
REPO: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
git diff -U0 origin/${{ github.base_ref }} -- docs/content README.md | { grep ^\+[^+] || true; } > $PATCH_FILE
sed -i "s#/cilium/tetragon/tree/main#/$REPO/tree/$BRANCH#g" $PATCH_FILE
sed -i "s#/cilium/tetragon/blob/main#/$REPO/blob/$BRANCH#g" $PATCH_FILE
sed -i "s#/cilium/tetragon/raw/main#/$REPO/raw/$BRANCH#g" $PATCH_FILE
sed -i "s#/cilium/tetragon/main#/$REPO/$BRANCH#g" $PATCH_FILE
cat $PATCH_FILE
- name: Serve the Hugo website
working-directory: docs
run: hugo server &
- name: Wait for server to be ready
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
with:
timeout_seconds: 2
max_attempts: 10
retry_wait_seconds: 3
command: |
set -e
curl -s http://localhost:1313 > /dev/null
- name: Check new links
id: lychee
uses: lycheeverse/lychee-action@a8c4c7cb88f0c7386610c35eb25108e448569cb0 # v2.7.0
with:
args: --config .github/lychee.toml --base http://localhost:1313 $PATCH_FILE
failIfEmpty: false # this can happen as we are checking diffs