-
Notifications
You must be signed in to change notification settings - Fork 388
37 lines (33 loc) · 1.25 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
name: Schedule run ci internal
on:
pull_request:
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.MY_APP_ID }}"
if [ ! -z "${APP_ID}" ]; then
echo "is_schedule_run_ci=1" >> $GITHUB_OUTPUT;
echo "secrets.MY_APP_ID is not empty, PR opened by the internal contributors"
else
echo "is_schedule_run_ci=-1" >> $GITHUB_OUTPUT;
echo "secrets.MY_APP_ID 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.MY_APP_ID 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.MY_APP_ID }}