-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (37 loc) · 1.28 KB
/
trigger_ci.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
32
33
34
35
36
37
on:
pull_request:
jobs:
mirror_repo:
environment: GITLAB
runs-on: self-hosted
steps:
- name: Sync Mirror Repository
run: |
#!/bin/bash
curl --request POST --header "PRIVATE-TOKEN:${{ secrets.TOKEN }}" "${{ secrets.MIRROR_URL }}"
trigger-ci:
environment: GITLAB
needs: mirror_repo
runs-on: self-hosted
steps:
- name: Trigger Pipeline
run: |
#!/bin/bash
curl --fail --request POST --form token=${{ secrets.PIPELINE_TOKEN }} -F ref=${GITHUB_HEAD_REF} -F variables[BUILD_OPTION]="BUILD-SOURCE" "${{ secrets.PIPELINE_URL }}"
add-verified-labels:
environment: GITLAB
runs-on: self-hosted
if: ${{ always() && !cancelled() && needs.*.result == 'success' }}
steps:
- name: Add labels
uses: actions/github-script@v5
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ['ready', 'verified_on_V100', 'verified_on_A100', 'verified_on_H100']
})
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}