From 756e7578465a47194d5f8dbd5f5704fe3372b6de Mon Sep 17 00:00:00 2001 From: Steven Wade Date: Fri, 3 May 2024 14:04:24 +0100 Subject: [PATCH] Set when to execute github actions. Signed-off-by: Steven Wade --- .github/workflows/golangci-lint.yaml | 11 +++++++++-- .github/workflows/sync-labels.yaml | 3 +-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 40852021..12f9ddfb 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -1,8 +1,15 @@ name: golangci on: + push: + branches: [ main ] + paths: + - '**/*.go' + - '**/go.mod' pull_request: - branches: - - main + branches: [ main ] + paths: + - '**/*.go' + - '**/go.mod' permissions: contents: read diff --git a/.github/workflows/sync-labels.yaml b/.github/workflows/sync-labels.yaml index 6e41b8c7..ac0cda8a 100644 --- a/.github/workflows/sync-labels.yaml +++ b/.github/workflows/sync-labels.yaml @@ -2,8 +2,7 @@ name: sync-labels on: workflow_dispatch: push: - branches: - - main + branches: [ main ] paths: - .github/labels.yaml