From 6c884f3a5c1c63e46401b7a81e64a64cfb25db1a Mon Sep 17 00:00:00 2001 From: Pierre Viseu Chevalier Date: Sun, 20 Feb 2022 13:04:16 +0000 Subject: [PATCH] Only trigger github actions on push or PR to main In the current state, if I want to make a PR and I push a branch to that effect, all the CI jobs get trigered twice. With this change, we will still test contributions at the time that matters: when a change to main is proposed. --- .github/workflows/rust.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9d2d713..1df816f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,8 @@ -on: [push, pull_request] +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] name: Rust