Skip to content

Commit

Permalink
Trigger Update Nodes Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
appujet committed Apr 9, 2024
1 parent 6ed1fbb commit 24df4cf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/main .yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,19 @@ jobs:
git add .
git diff-index --quiet HEAD || git commit -m "Remove duplicate nodes"
git push
- name: Trigger Update Nodes Workflow
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: workflows } = await github.actions.listRepoWorkflows({
owner: context.repo.owner,
repo: context.repo.repo
});
const updateNodesWorkflow = workflows.workflows.find(workflow => workflow.name === 'Update Nodes');
await github.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: updateNodesWorkflow.id
});

0 comments on commit 24df4cf

Please sign in to comment.