From 461a95a01e35b84317740d6df2bb7cef8b3e7d77 Mon Sep 17 00:00:00 2001 From: Pavel Nikolov Date: Thu, 25 Jul 2024 19:02:19 +0300 Subject: [PATCH] restrict wf paths Signed-off-by: Pavel Nikolov --- .github/workflows/docker.yml | 3 ++- .github/workflows/rust.yml | 11 +++++++++-- .github/workflows/terraform-plan.yml | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 424d6a3..d3d114f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -2,7 +2,8 @@ name: Create and publish a Docker image on: push: - branches: ['main'] + branches: + - 'main' env: REGISTRY: ghcr.io diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5f14870..0c035c9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,16 @@ name: Build on: push: - branches: [ "main" ] + branches: + - 'main' pull_request: - branches: [ "main" ] + paths: + - 'src/**' + - 'tests/**' + - 'Cargo.toml' + - 'Cargo.lock' + - '.github/workflows/rust.yml' + - 'build.rs' env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/terraform-plan.yml b/.github/workflows/terraform-plan.yml index ae5204f..b31e73d 100644 --- a/.github/workflows/terraform-plan.yml +++ b/.github/workflows/terraform-plan.yml @@ -3,7 +3,7 @@ name: "Terraform Plan" on: pull_request: paths: - - 'terraform/**' + - './terraform/**' env: TF_WORKSPACE: "default"