Skip to content

fix(ci): ensure Docker publish workflow triggers on release #19

fix(ci): ensure Docker publish workflow triggers on release

fix(ci): ensure Docker publish workflow triggers on release #19

# ============================================================================
# Changeset PR Check Workflow
# ============================================================================
# Reports a passing "test" status for automated changeset PRs.
#
# Why this exists:
# 1. Changeset PRs are created by github-actions[bot] using GITHUB_TOKEN
# 2. Workflows triggered by GITHUB_TOKEN don't trigger other workflows
# 3. This causes the required "test" check to hang on "Waiting for status"
#
# Solution:
# - Use pull_request_target which runs even for bot-created PRs
# - Use GitHub Status API to create the exact "test" status context
# - Only runs for PRs titled "chore: version packages"
# ============================================================================
name: Changeset PR Check
permissions:
contents: read
statuses: write
on:
pull_request_target:
branches: [main]
jobs:
changeset-check:
name: Changeset PR Check
runs-on: ubuntu-latest
# Only run for changeset PRs (identified by title)
if: github.event.pull_request.title == 'chore: version packages'

Check failure on line 32 in .github/workflows/changeset-pr-check.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/changeset-pr-check.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
steps:
- name: Report test status for changeset PR
uses: actions/github-script@v7
with:
script: |
// Create a commit status with context "test" to satisfy branch protection
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.pull_request.head.sha,
state: 'success',
context: 'test',
description: 'Skipped - changeset PR only updates versions'
});
console.log('✅ Reported "test" status as success for changeset PR');