Browse Source

chore(CICD): trigger CI based on label

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3831/head
Raju Udava 2 years ago
parent
commit
3eae8d41c3
  1. 33
      .github/workflows/ci-cd.yml

33
.github/workflows/ci-cd.yml

@ -12,6 +12,7 @@ on:
- "packages/nocodb/**" - "packages/nocodb/**"
- ".github/workflows/ci-cd.yml" - ".github/workflows/ci-cd.yml"
pull_request: pull_request:
types: [opened, reopened, synchronize, ready_for_review, labeled]
branches: [develop] branches: [develop]
paths: paths:
- "packages/nc-gui/**" - "packages/nc-gui/**"
@ -21,7 +22,7 @@ on:
jobs: jobs:
cypress-restTableOps-run-cache: cypress-restTableOps-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -66,7 +67,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-restViews-run-cache: cypress-restViews-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -111,7 +112,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-restRoles-run-cache: cypress-restRoles-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -156,7 +157,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-restMisc-run-cache: cypress-restMisc-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -201,7 +202,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-xcdb-restTableOps-run-cache: cypress-xcdb-restTableOps-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -246,7 +247,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-xcdb-restViews-run-cache: cypress-xcdb-restViews-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -291,7 +292,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-xcdb-restRoles-run-cache: cypress-xcdb-restRoles-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -336,7 +337,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-xcdb-restMisc-run-cache: cypress-xcdb-restMisc-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -381,7 +382,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-pg-restTableOps-run-cache: cypress-pg-restTableOps-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -426,7 +427,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-pg-restViews-run-cache: cypress-pg-restViews-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -471,7 +472,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-pg-restRoles-run-cache: cypress-pg-restRoles-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -516,7 +517,7 @@ jobs:
retention-days: 2 retention-days: 2
cypress-pg-restMisc-run-cache: cypress-pg-restMisc-run-cache:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -561,7 +562,7 @@ jobs:
retention-days: 2 retention-days: 2
cy-quick-sqlite: cy-quick-sqlite:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -607,7 +608,7 @@ jobs:
retention-days: 2 retention-days: 2
cy-quick-pg: cy-quick-pg:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -652,7 +653,7 @@ jobs:
retention-days: 2 retention-days: 2
unit-tests: unit-tests:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1
@ -692,7 +693,7 @@ jobs:
run: npm run test:unit run: npm run test:unit
cypress-db-independent: cypress-db-independent:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
if: ${{ github.event_name == 'push' || github.event.label.name == 'trigger-CI' || !github.event.pull_request.draft }} if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }}
steps: steps:
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v1 uses: actions/setup-node@v1

Loading…
Cancel
Save