Skip to content

update: eliminate circular dependendency #1

update: eliminate circular dependendency

update: eliminate circular dependendency #1

Workflow file for this run

name: preview

Check failure on line 1 in .github/workflows/preview.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/preview.yml

Invalid workflow file

(Line: 31, Col: 13): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.BOT_APP_ID != '' && secrets.BOT_PRIVATE_KEY != ''
on:
workflow_call:
inputs:
publish:
description: 'The directory to publish to pkg.pr.new'
default: "./packages/**"
required: false
type: string
template:
description: 'The directory of templates to publish to StackBlitz'
default: "./examples/**"
required: false
type: string
secrets:
BOT_APP_ID:
description: 'The GitHub App ID for authenticating with the GitHub API'
required: false
BOT_PRIVATE_KEY:
description: 'The GitHub App Private Key for authenticating with the GitHub API'
required: false
jobs:
preview:
if: github.repository_owner == 'bombshell-dev'
runs-on: ubuntu-latest
steps:
# Only generate token if secrets are provided (external calls)
- name: Generate a token
if: secrets.BOT_APP_ID != '' && secrets.BOT_PRIVATE_KEY != ''
id: bot-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
# Checkout with conditional token usage
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.BOT_APP_ID != '' && secrets.BOT_PRIVATE_KEY != '' && steps.bot-token.outputs.token || '' }}
- name: Setup PNPM
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm run build
- name: Publish Preview
run: pnpx pkg-pr-new publish '${{inputs.publish}}' --template '${{inputs.template}}'