forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (30 loc) · 1.33 KB
/
trigger-contribution-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Trigger Contribution Build
on:
pull_request_target:
types: [labeled]
jobs:
trigget_contrib_build:
runs-on: ubuntu-latest
if: github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 'ready-for-instance-test') == true && github.event.pull_request.head.repo.fork == true
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
- name: Install Python Dependencies
run: |
poetry install
- name: Trigger Contribution Build
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
CONTRIB_BRANCH: ${{ github.event.pull_request.head.label }}
USERNAME: ${{ secrets.TRIGGER_BUILD_USER }}
PASSWORD: ${{ secrets.TRIGGER_BUILD_PASSWORD }}
run: |
echo "Trigger contribution build for PR: $PR_NUMBER with base branch: $BASE_BRANCH contrib branch: $CONTRIB_BRANCH"
poetry run python ./Utils/github_workflow_scripts/trigger_contribution_build.py --pr_number $PR_NUMBER --base_branch $BASE_BRANCH --contrib_branch $CONTRIB_BRANCH --username $USERNAME --password $PASSWORD