Skip to content

chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 #458

chore(deps): bump actions/checkout from 7.0.0 to 7.0.1

chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 #458

Workflow file for this run

name: compare llms-full.txt
permissions:
contents: read
on:
pull_request:
paths:
- '.github/workflows/compare.yml'
- 'site/**'
jobs:
build-current:
concurrency:
cancel-in-progress: ${{ github.ref_name != 'master' }}
group: ${{ github.workflow }}-build-current-${{ github.event.pull_request.number || github.sha }}
name: Build current branch
runs-on: ubuntu-latest
outputs:
artifact-name: current-llms-full-txt
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
cache: true
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: lts/*
- name: Install dependencies
run: pnpm install
- name: Build
working-directory: site
run: pnpm build
- name: Upload current build artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: current-llms-full-txt
path: site/build/llms-full.txt
build-target:
concurrency:
cancel-in-progress: ${{ github.ref_name != 'master' }}
group: ${{ github.workflow }}-build-target-${{ github.event.pull_request.number || github.sha }}
name: Build target branch
runs-on: ubuntu-latest
outputs:
artifact-name: target-llms-full-txt
steps:
- name: Harden Runner
uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0
with:
egress-policy: audit
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
cache: true
- name: Use Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: lts/*
- name: Install dependencies
run: pnpm install
- name: Checkout target branch and build
env:
TARGET_BRANCH: ${{ github.event.pull_request.base.ref || 'master' }}
run: |
# Validate branch name format before using it
if [[ ! "$TARGET_BRANCH" =~ ^[a-zA-Z0-9._/-]+$ ]]; then
echo "Error: invalid target branch name"
exit 1
fi
git fetch origin "$TARGET_BRANCH:$TARGET_BRANCH"
git checkout "$TARGET_BRANCH"
pnpm install
cd site && pnpm build
- name: Upload target build artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: target-llms-full-txt
path: site/build/llms-full.txt
diff:
concurrency:
cancel-in-progress: ${{ github.ref_name != 'master' }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
name: Diff current branch vs. target branch
runs-on: ubuntu-latest
needs: [build-current, build-target]
steps:
- name: Download current build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: current-llms-full-txt
path: current/
- name: Download target build
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: target-llms-full-txt
path: target/
- name: Diff current vs. target
uses: LouisBrunner/diff-action@ab382b451dbb2333cbb4db158d211d07fb5c82c6 # v3.0.0
with:
mode: addition
new: current/llms-full.txt
old: target/llms-full.txt
output: diff-llms-full.txt
tolerance: mixed