Skip to content

Commit 38e8d59

Browse files
committed
gha: limit release workflow by file name
1 parent 532e809 commit 38e8d59

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,25 @@ jobs:
2424
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
2525
with:
2626
fetch-depth: 0
27+
fetch-tags: true
2728

28-
- name: fetch tags
29-
run: git fetch --force --tags
29+
# only generate a new release if certain files change:
30+
- uses: dorny/paths-filter@v2
31+
id: filter
32+
with:
33+
filters: |
34+
app:
35+
- 'action.yaml'
36+
- '**.sh'
37+
- 'Dockerfile'
3038
3139
- name: install autotag binary
40+
if: steps.filter.outputs.app == 'true'
3241
run: |
3342
curl -sL https://git.io/autotag-install | sudo sh -s -- -b /usr/local/bin
3443
3544
- name: increment tag and create release
45+
if: steps.filter.outputs.app == 'true'
3646
run: |
3747
set -eou pipefail
3848

0 commit comments

Comments
 (0)