From 4a5d09ae9c73fc15bc5e3b6798d67924b3f0236e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guillois?= Date: Wed, 19 Jun 2024 16:39:21 +0200 Subject: [PATCH] chore: optimize actions triggers --- .github/workflows/codeql-analysis.yml | 12 ++++++++++++ .github/workflows/github-actions.yml | 9 ++++++++- .github/workflows/review-app.yml | 9 +++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index da462872e..ee972b41a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,9 +14,21 @@ name: "CodeQL" on: push: branches: [ main ] + paths: + - frontend/** + - queue/** + - server/** + - shared/** + - packages/** pull_request: # The branches below must be a subset of the branches above branches: [ main ] + paths: + - frontend/** + - queue/** + - server/** + - shared/** + - packages/** schedule: - cron: '21 21 * * 4' diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index bb2f6aad3..86671da59 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -1,6 +1,13 @@ name: Node.js CI -on: [push] +on: + push: + paths: + - frontend/** + - queue/** + - server/** + - shared/** + - packages/** jobs: build: diff --git a/.github/workflows/review-app.yml b/.github/workflows/review-app.yml index 5091b7235..b36ddd1b8 100644 --- a/.github/workflows/review-app.yml +++ b/.github/workflows/review-app.yml @@ -6,7 +6,12 @@ on: pull_request_target: types: [opened, closed, synchronize, reopened] branches: [main] - + paths: + - frontend/** + - queue/** + - server/** + - shared/** + - packages/** env: CLEVER_SECRET: ${{ secrets.CLEVER_SECRET }} CLEVER_TOKEN: ${{ secrets.CLEVER_TOKEN }} @@ -29,7 +34,7 @@ jobs: run: clever addon create redis-addon $PR_NAME-redis --org $ORGA_ID --plan s_mono --region par deploy-api: - if: github.event.action == 'opened' || github.event.action == 'reopened' + if: (github.event.action == 'opened' || github.event.action == 'reopened') && !github.event.pull_request.draft needs: [deploy-addons] runs-on: ubuntu-latest environment: