From 3cc37b4b7352a772636b7134834caf127797e965 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 9 Sep 2024 16:31:25 +0500 Subject: [PATCH] chore: optimize ci (#481) * chore: prevent ci from running twice on PRs Now CI will only run on push to `master` and PRs to `master`. Previously, it was running twice on each push to a PR branch, once for the PR to `master` and once for pushing to the PR branch. --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13ddbf3e..8450f14d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,11 @@ name: ci -on: [push, pull_request] +on: + push: + branches: + - master + pull_request: + branches: + - master concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true