Skip to content

Commit

Permalink
add path to push to main branch to only run release on changes to main
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Pelletier committed Feb 2, 2024
1 parent 979b174 commit 3367d84
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/minimal-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
push:
branches:
- main
paths:
- operator/**
- "!operator/webhook/**"
- .github/workflows/operator.yml

env:
WORKING_DIR: ./minimal-app
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ on:
push:
branches:
- main
paths:
- operator/**
- "!operator/webhook/**"
- .github/workflows/operator.yml

env:
WORKING_DIR: ./operator
GIT_TAG_PREFIX: operator_v

jobs:
build:
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -26,6 +31,7 @@ jobs:
name: generate release files

release:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -43,6 +49,7 @@ jobs:
name: generate names for artifacts
- run: make prep-release
name: generate release files

- uses: mathieudutour/[email protected]
id: tag_version
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
push:
branches:
- main
paths:
- operator/**
- "!operator/webhook/**"
- .github/workflows/operator.yml

env:
WORKING_DIR: ./operator/webhook
Expand Down

0 comments on commit 3367d84

Please sign in to comment.