Skip to content

Commit

Permalink
[CI] Github Action trigger condition optimized for cost saving (#411)
Browse files Browse the repository at this point in the history
github action trigger condition optimized
  • Loading branch information
nwangfw authored Nov 20, 2024
1 parent b932161 commit 91a7acc
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/installation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,24 @@ name: Installation Tests
on:
push:
branches: [ "main" ]
paths:
- 'config/**'
- 'pkg/**'
- 'cmd/**'
- 'python/**'
- 'Makefile'
- 'go.mod'
- 'go.sum'
pull_request:
branches: [ "main" ]
paths:
- 'config/**'
- 'pkg/**'
- 'cmd/**'
- 'python/**'
- 'Makefile'
- 'go.mod'
- 'go.sum'

jobs:
build-images:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/lint-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@ name: Linter and Unit Tests
on:
push:
branches: [ "main" ]
paths:
- 'pkg/**'
- 'cmd/**'
- 'api/**'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'
pull_request:
branches: [ "main" ]
paths:
- 'pkg/**'
- 'cmd/**'
- 'api/**'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'

jobs:
lint:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ name: Python Tests
on:
push:
branches: [ "main" ]
paths:
- 'python/**'
pull_request:
branches: [ "main" ]

paths:
- 'python/**'
jobs:
lint:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Release Build and Push

on:
workflow_dispatch: # Allows manual trigger
push:
tags:
- 'v*' # This triggers the workflow on any new tag
Expand Down

0 comments on commit 91a7acc

Please sign in to comment.