Skip to content

deps(github-actions): update actions/checkout action ( v4.1.7 → v4.2.1 ) #215

deps(github-actions): update actions/checkout action ( v4.1.7 → v4.2.1 )

deps(github-actions): update actions/checkout action ( v4.1.7 → v4.2.1 ) #215

Workflow file for this run

---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Link Checker
on:
# Manual Trigger
workflow_dispatch:
inputs:
dry-run:
description: Dry Run
default: true
required: false
type: boolean
# Dry Run on any PR that modifies the workflow, the dockerfile or the site contents
pull_request:
paths:
- ".github/workflows/link-checker.yaml"
- "website/**"
# "Wet" run daily at midnight
schedule:
- cron: "0 0 * * *"
env:
WORKFLOW_ISSUE_TITLE: "Link Checker Dashboard 🔗"
jobs:
build-site:
runs-on: ubuntu-latest
steps:
- name: Generate Token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
token: "${{ steps.app-token.outputs.token }}"
- name: Install jekyll and bundler
run: sudo gem install bundler jekyll
- name: Show bundler version
run: bundler --version
- name: Show jekyll version
run: jekyll --version
- name: Install gems
run: sudo bundle install --gemfile=website/Gemfile
- name: Run jekyll build
working-directory: ./website
run: bundle exec jekyll build --trace
- name: Upload built site to artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: "${{ github.sha }}"
path: website/_site/
link-checker:
runs-on: ubuntu-latest
needs: [build-site]
steps:
- name: Generate Token
uses: actions/create-github-app-token@3378cda945da322a8db4b193e19d46352ebe2de5 # v1.10.4
id: app-token
with:
app-id: "${{ secrets.BOT_APP_ID }}"
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
token: "${{ steps.app-token.outputs.token }}"
- name: Download Site Files
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: ./site
- name: Check Links
id: link-checker
uses: lycheeverse/lychee-action@2b973e86fc7b1f6b36a93795fe2c9c6ae1118621 # v1.10.0
with:
args: --config=lychee.toml './site/**/*.html'
format: markdown
output: lychee.md
fail: false
- name: Find Link Checker Issue
id: find-issue
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.dry-run == 'false') || github.event_name == 'schedule' }}
run: |
gh_output=$(gh issue list --state=open --json=number --search="in:title $WORKFLOW_ISSUE_TITLE")
issue_number=$(echo "$gh_output" | jq --raw-output '.[0].number')
echo "issue-number=${issue_number}" >> "$GITHUB_OUTPUT"
echo "${issue_number}"
env:
GH_TOKEN: "${{ steps.app-token.outputs.token }}"
- name: Create or Update Issue
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94 # v5.0.0
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.dry-run == 'false') || github.event_name == 'schedule' }}
with:
token: "${{ steps.app-token.outputs.token }}"
title: "${{ env.WORKFLOW_ISSUE_TITLE }}"
issue-number: "${{ steps.find-issue.outputs.issue-number || '' }}"
content-filepath: lychee.md