-
Notifications
You must be signed in to change notification settings - Fork 72
42 lines (37 loc) · 1.36 KB
/
schedule-run-ci-internal.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
38
39
40
41
42
name: Schedule run ci internal
# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
on:
pull_request:
push:
jobs:
check_permission:
name: Check permission
if: ${{ !contains(github.event.pull_request.labels.*.name, 'ci:skip') }}
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
is_schedule_run_ci: ${{ steps.check-label-step.outputs.is_schedule_run_ci }}
steps:
- name: Check for Secret availability
id: check-label-step
# perform secret check & put boolean result as an output
shell: bash
run: |
APP_ID="${{ secrets.APP_ID_RTM }}"
if [ ! -z "${APP_ID}" ]; then
echo "is_schedule_run_ci=1" >> $GITHUB_OUTPUT;
echo "secrets.APP_ID_RTM is not empty, PR opened by the internal contributors"
else
echo "is_schedule_run_ci=-1" >> $GITHUB_OUTPUT;
echo "secrets.APP_ID_RTM is empty, PR opened by the external contributors"
fi
schedule_ci:
name: Schedule run ci
needs: check_permission
# If the PR requested by a external contributor, the secrets.APP_ID_RTM should be empty, and skip this workflow
if: ${{ needs.check_permission.outputs.is_schedule_run_ci == 1 }}
uses: ./.github/workflows/build.yml
secrets:
MY_APP_ID: ${{ secrets.APP_ID_RTM }}