Skip to content

design: track media URLs in custom Portable Text blocks #2324

design: track media URLs in custom Portable Text blocks

design: track media URLs in custom Portable Text blocks #2324

name: Release Action Bundle
# Dependabot updates can change dependencies embedded in the checked-in
# JavaScript action. This unprivileged stage rebuilds the bundle and hands the
# resulting artifact to Release Action Bundle — Apply. It has no secrets and
# cannot push to the pull request.
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize]
permissions:
contents: read
concurrency:
group: release-action-bundle-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build:
name: Build
if: |
github.event.pull_request.user.login == 'dependabot[bot]'
&& github.actor != 'emdashbot[bot]'
&& startsWith(github.event.pull_request.head.ref, 'dependabot/npm_and_yarn/')
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build release action dependency closure
run: pnpm --filter '@emdash-cms/release-action...' build
- name: Capture bundle
id: bundle
run: |
if git diff --quiet -- apps/release-action/dist/index.js; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "The compiled release action is current."
else
echo "changed=true" >> "$GITHUB_OUTPUT"
mkdir -p release-action-bundle-out
cp apps/release-action/dist/index.js release-action-bundle-out/index.js
echo "${{ github.event.pull_request.number }}" > release-action-bundle-out/pr-number
echo "The compiled release action changed; uploading it."
fi
- name: Upload bundle
if: steps.bundle.outputs.changed == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: release-action-bundle
path: release-action-bundle-out/
retention-days: 7
if-no-files-found: error