From 2df93846cde2e547ae8f355da9e958d948e190a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ti=E1=BA=BFn=20Nguy=E1=BB=85n=20Kh=E1=BA=AFc?= Date: Wed, 5 Feb 2025 12:20:45 +1300 Subject: [PATCH] ci: update workflow triggers (#444) --- .github/workflows/deployment.yml | 8 +++++++- .github/workflows/publishing.yml | 4 +++- .github/workflows/pull-request.yml | 16 ---------------- .github/workflows/verification.yml | 9 ++++++++- .husky/pre-commit | 3 +-- 5 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/pull-request.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 56691fc1..b4fa26d7 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -1,8 +1,14 @@ name: Deployment on: - push: + workflow_run: + workflows: ["Verification"] branches: [main] + types: [completed] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: deploy-documentation: diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml index 69fb5b73..6364ba5d 100644 --- a/.github/workflows/publishing.yml +++ b/.github/workflows/publishing.yml @@ -1,8 +1,10 @@ name: Publishing on: - push: + workflow_run: + workflows: ["Verification"] branches: [main] + types: [completed] concurrency: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml deleted file mode 100644 index caa1d229..00000000 --- a/.github/workflows/pull-request.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Pull request - -on: - pull_request: - branches: [main] - # Add trigger for `ready_for_review` - # https://github.com/changesets/action/issues/187 - types: [opened, reopened, synchronize, ready_for_review] - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - verify: - uses: ./.github/workflows/verification.yml diff --git a/.github/workflows/verification.yml b/.github/workflows/verification.yml index c1c74ac2..ea38910a 100644 --- a/.github/workflows/verification.yml +++ b/.github/workflows/verification.yml @@ -1,6 +1,13 @@ name: Verification -on: [workflow_call, workflow_dispatch] +on: + push: + branches: [main] + pull_request: + branches: [main] + # Add trigger for `ready_for_review` + # https://github.com/changesets/action/issues/187 + types: [opened, reopened, synchronize, ready_for_review] jobs: verify: diff --git a/.husky/pre-commit b/.husky/pre-commit index 7115cbe1..c58e8ce8 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1 @@ -yarn lint -yarn test run \ No newline at end of file +yarn lint \ No newline at end of file