Update workflows to trigger on specific file changes

The update limits the GolangCI, Codecov, SonarQube, and Docker workflow triggers to only fire when specific related files are modified. By focusing on relevant paths like '**.go', 'go.*' and respective workflow files, we enhance the efficiency of our CI/CD process.
This commit is contained in:
Winni Neessen 2024-03-25 19:32:40 +01:00
parent b7b4073483
commit 0e2df1fe07
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D
4 changed files with 27 additions and 2 deletions

View file

@ -11,7 +11,7 @@ on:
paths:
- '**.go'
- 'go.*'
- '.github/**'
- '.github/workflow/codecov.yml'
- 'codecov.yml'
pull_request:
branches:
@ -19,7 +19,7 @@ on:
paths:
- '**.go'
- 'go.*'
- '.github/**'
- '.github/workflow/codecov.yml'
- 'codecov.yml'
jobs:
run:

View file

@ -14,10 +14,20 @@ on:
- cron: '24 12 * * *'
push:
branches: [ main ]
paths:
- '**.go'
- 'go.*'
- '.github/workflow/docker-publish.yml'
- 'codecov.yml'
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ main ]
paths:
- '**.go'
- 'go.*'
- '.github/workflow/docker-publish.yml'
- 'codecov.yml'
permissions:
contents: read

View file

@ -9,7 +9,17 @@ on:
- v*
branches:
- main
paths:
- '**.go'
- 'go.*'
- '.github/workflow/golangci-lint.yml'
- 'codecov.yml'
pull_request:
paths:
- '**.go'
- 'go.*'
- '.github/workflow/golangci-lint.yml'
- 'codecov.yml'
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.

View file

@ -8,6 +8,11 @@ on:
push:
branches:
- main # or the name of your main branch
paths:
- '**.go'
- 'go.*'
- '.github/workflow/sonarqube.yml'
- 'codecov.yml'
jobs:
build:
name: Build