Adding workflow_dispatch to changeset workflow

This commit is contained in:
a8trejo
2025-01-15 15:34:08 -08:00
parent 50cae9b174
commit 966a3b60db

View File

@@ -2,20 +2,23 @@ name: Changeset Release
run-name: Changeset Release ${{ github.actor != 'R00-B0T' && '- Create PR' || '- Update Changelog' }} run-name: Changeset Release ${{ github.actor != 'R00-B0T' && '- Create PR' || '- Update Changelog' }}
on: on:
workflow_dispatch:
pull_request: pull_request:
types: [closed, opened, labeled] types: [closed, opened, labeled]
env: env:
REPO_PATH: ${{ github.repository }} REPO_PATH: ${{ github.repository }}
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
jobs: jobs:
# Job 1: Create version bump PR when changesets are merged to main # Job 1: Create version bump PR when changesets are merged to main
changeset-pr-version-bump: changeset-pr-version-bump:
if: > if: >
github.event_name == 'pull_request' && ( github.event_name == 'pull_request' &&
github.event.pull_request.merged == true && github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main' && github.event.pull_request.base.ref == 'main' &&
github.actor != 'R00-B0T' github.actor != 'R00-B0T' ) ||
github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: write contents: write
@@ -25,7 +28,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ env.GIT_REF }}
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4