Skip to content

First commit for RTM 2.x #16

First commit for RTM 2.x

First commit for RTM 2.x #16

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 }}