Skip to content

Check dispatch

Check dispatch #904

name: Publish Pre-Release to NPM
on:
# When standard Pull Request is merged
pull_request:
branches:
- master
jobs:
createReleasePullRequest:
runs-on: ubuntu-latest
steps:
- name: "Trigger Oauth Service Pipeline Workflow"
uses: actions/github-script@v7
env:
PR_VERSION: 'test-alpha.${{ github.run_id }}'
with:
github-token : ${{ secrets.DISPATCH_WORKFLOWS_TOKEN }}
script: |
const fe_react_version= process.env.PR_VERSION;
const owner = context.payload.repository.organization
const oauthServiceRepo = 'oauth-service'
const workflow_id = 'update-react-dependency.yaml'
const data = await github.rest.actions.createWorkflowDispatch({
owner,
repo: oauthServiceRepo,
workflow_id,
ref: 'master',
inputs: {
fe_react_version,
}
});