Skip to content

Commit fe855e5

Browse files
authored
Restrict charts pushing workflow (#191)
1 parent a10b177 commit fe855e5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/publish-chart.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
name: Release Helm Chart
22

33
on:
4+
release:
5+
types:
6+
- published
47
push:
58
branches:
69
- main
710
tags:
811
- 'v*.*.*'
12+
paths-ignore:
13+
- 'docs/**'
14+
- '**/*.md'
915
pull_request:
1016
branches:
1117
- main
18+
paths-ignore:
19+
- 'docs/**'
20+
- '**/*.md'
21+
types: [labeled, opened, synchronize, reopened]
1222

1323
jobs:
1424
helm-chart:
@@ -17,6 +27,10 @@ jobs:
1727
contents: read
1828
packages: write
1929

30+
if: |
31+
github.event_name == 'push' ||
32+
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ok-to-charts')) ||
33+
(github.event_name == 'release' && github.event.action == 'published')
2034
steps:
2135
- name: Checkout code
2236
uses: actions/checkout@v4

0 commit comments

Comments
 (0)