Skip to content

Commit

Permalink
trigger reading external actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniBodor committed Jun 24, 2024
1 parent 5bab10a commit 41c234a
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release_github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,53 @@ jobs:
# option 1: check whether other actions have passed already
# option 2: trigger actions from here

- name: Check build action
id: check_build_action
uses: actions/github-script@v5
with:
script: |
const branchName = '${{ github.event.inputs.release_branch }}';
const workflowFile = 'build.yml';
github.actions.createWorkflowDispatch({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
workflow_id: 'check_or_run_workflow.yml',
ref: github.context.ref,
inputs: {
branch_name: branchName,
read_workflow: workflowFile
}
}).then(response => {
core.info('Successfully triggered Check or Run Workflow for $workflowFile');
}).catch(error => {
core.setFailed(`Failed to trigger Check or Run Workflow for $workflowFile: ${error.message}`);
});
- name: Check dashboard action
if: github.event.inputs.required_dash == 'true'
id: check_dashboard_action
uses: actions/github-script@v5
with:
script: |
const branchName = '${{ github.event.inputs.release_branch }}';
const workflowFile = 'dashboard.yml';
github.actions.createWorkflowDispatch({
owner: github.context.repo.owner,
repo: github.context.repo.repo,
workflow_id: 'check_or_run_workflow.yml',
ref: github.context.ref,
inputs: {
branch_name: branchName,
read_workflow: workflowFile
}
}).then(response => {
core.info('Successfully triggered Check or Run Workflow for $workflowFile');
}).catch(error => {
core.setFailed(`Failed to trigger Check or Run Workflow for $workflowFile: ${error.message}`);
});
- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down

0 comments on commit 41c234a

Please sign in to comment.