Skip to content

chore(provision-sitecore-ai-component): Repository updates #28

chore(provision-sitecore-ai-component): Repository updates

chore(provision-sitecore-ai-component): Repository updates #28

Workflow file for this run

name: Create or update PR
on:
workflow_dispatch:
inputs:
base_branch:
description: "Target base branch"
required: true
default: "main"
draft:
description: "Create PR as draft"
required: true
default: "true"
push:
branches-ignore:
- main
- "bot/wiki-**"
permissions:
contents: read
pull-requests: write
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
pr:
if: ${{ !startsWith(github.ref_name, 'bot/wiki-') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "24.14.0"
- name: Enable pnpm via Corepack
run: corepack enable && corepack prepare pnpm@10.33.0 --activate
- name: Get pnpm store path
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- name: Cache pnpm store
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create or update PR
env:
GH_TOKEN: ${{ secrets.PR_BOT_TOKEN }}
PR_BASE_BRANCH: ${{ github.event.inputs.base_branch || 'main' }}
PR_HEAD_BRANCH: ${{ github.ref_name }}
PR_DRAFT: ${{ github.event.inputs.draft || 'true' }}
PR_AI: ${{ vars.PR_AI }}
PR_AI_ENDPOINT: ${{ vars.PR_AI_ENDPOINT }}
PR_AI_MODEL: ${{ vars.PR_AI_MODEL }}
PR_AI_API_KEY: ${{ secrets.PR_AI_API_KEY }}
run: pnpm run pr:create