Scheduling infrastructure for absolutely everyone.
Adds security checks for PRs (#1503)
Omar Lópezf8c036164c4f
diff --git a/.github/workflows/build.yml b/.github/workflows/build.ymlindex 4ff005f2caa..85a71a98211 100644--- a/.github/workflows/build.yml+++ b/.github/workflows/build.yml@@ -1,17 +1,22 @@name: Buildon:- push:- branches:- - main- - staging- pull_request:+ pull_request_target:branches:- mainjobs:+ approve:+ runs-on: ubuntu-latest++ steps:+ - name: Approve+ run: echo For security reasons, all pull requests need to be approved first before running any automated CI.+build:+ needs: [approve] # Require the first step to finishtimeout-minutes: 5name: Build on Node ${{ matrix.node }} and ${{ matrix.os }}-+ environment:+ name: Previewenv:DATABASE_URL: postgresql://postgres:@localhost:5432/calendsoNODE_ENV: test@@ -35,6 +40,9 @@ jobs:steps:- name: Checkout repouses: actions/checkout@v2+ with:+ ref: ${{ github.event.pull_request.head.sha }}+ fetch-depth: 2- name: Use Node ${{ matrix.node }}uses: actions/setup-node@v1@@ -57,28 +65,3 @@ jobs:- run: yarn prisma migrate deploy- run: yarn test- run: yarn build-- types:- name: Check types-- strategy:- matrix:- node: ["14.x"]- os: [ubuntu-latest]- runs-on: ${{ matrix.os }}-- steps:- - name: Checkout repo- uses: actions/checkout@v2- with:- fetch-depth: 0-- - name: Use Node ${{ matrix.node }}- uses: actions/setup-node@v1- with:- node-version: ${{ matrix.node }}-- - name: Install deps- uses: bahmutov/npm-install@v1-- - run: yarn check-changed-filesdiff --git a/.github/workflows/check-types.yml b/.github/workflows/check-types.ymlnew file mode 100644index 00000000000..bd83603180f--- /dev/null+++ b/.github/workflows/check-types.yml@@ -0,0 +1,30 @@+name: Check types+on:+ pull_request:+ branches:+ - main+jobs:+ types:+ name: Check types++ strategy:+ matrix:+ node: ["14.x"]+ os: [ubuntu-latest]+ runs-on: ${{ matrix.os }}++ steps:+ - name: Checkout repo+ uses: actions/checkout@v2+ with:+ fetch-depth: 0++ - name: Use Node ${{ matrix.node }}+ uses: actions/setup-node@v1+ with:+ node-version: ${{ matrix.node }}++ - name: Install deps+ uses: bahmutov/npm-install@v1++ - run: yarn check-changed-filesdiff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.ymlindex b81d773c1e2..bbd77a9fa97 100644--- a/.github/workflows/e2e.yml+++ b/.github/workflows/e2e.yml@@ -1,17 +1,22 @@name: E2E teston:- push:- branches:- - main- - staging- pull_request:+ pull_request_target:branches:- mainjobs:+ approve:+ runs-on: ubuntu-latest++ steps:+ - name: Approve+ run: echo For security reasons, all pull requests need to be approved first before running any automated CI.+test:timeout-minutes: 10name: ${{ matrix.node }} and ${{ matrix.os }}-+ needs: [approve] # Require the first step to finish+ environment:+ name: Previewenv:DATABASE_URL: postgresql://postgres:@localhost:5432/calendsoBASE_URL: http://localhost:3000@@ -52,6 +57,9 @@ jobs:steps:- name: Checkout repouses: actions/checkout@v2+ with:+ ref: ${{ github.event.pull_request.head.sha }}+ fetch-depth: 2- name: Use Node ${{ matrix.node }}uses: actions/setup-node@v1