deps(github-actions): update peter-evans/create-issue-from-file action ( v5.0.0 → v5.0.1 ) #214
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
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@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1 | |
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 |