Skip to content

Trigger workflow only when PR has label 'test' #26

Trigger workflow only when PR has label 'test'

Trigger workflow only when PR has label 'test' #26

# GH Action workflow to trigger CI facilitated by Intel Red Hat DCI Apps Job
# It requires a user name and a PAT to access the private repo that contains the actual action.
# Trigger the workflow on pull_request event on main branch. The PR needs to have the 'test' label.
# workflow_dispatch allows you to run this workflow manually from the Actions tab
name: Trigger DCI Apps Workflow
on:
workflow_dispatch:
pull_request:
types: [ labeled ]
branches: main
jobs:
using-trigger-and-wait:
name: Remote Trigger for DCI Apps Job
if: ${{ github.event.label.name == 'test' }}
runs-on: self-hosted
steps:
- uses: convictional/[email protected]
with:
owner: intel
repo: ocpeng
github_user: intelocpeng
github_token: ${{secrets.GHA}}
workflow_file_name: dci-app-agent-workflow.yml
ref: main
wait_interval: 10
propagate_failure: true
trigger_workflow: true
wait_workflow: true