Skip to content

Check dispatch

Check dispatch #906

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: ''
with:
github-token : ${{ secrets.DISPATCH_WORKFLOWS_TOKEN }}
script: |
const fe_react_version = "test-alpha.${{ github.run_id }}";
const owner = context.payload.repository.organization;
const oauthServiceRepo = 'oauth-service';
const workflow_id = 'update-react-dependency.yaml';
console.log(owner);
console.log(JSON.stringify(context));
const data = await github.rest.actions.createWorkflowDispatch({
owner,
repo: oauthServiceRepo,
workflow_id,
ref: "master",
inputs: {
fe_react_version,
}
});