Skip to content

Commit d7024a7

Browse files
committed
fix: run jacoco jobs only on a specific branch
1 parent f7f31c9 commit d7024a7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/maven.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848
retention-days: 1
4949
path: coatjava.tar.gz
5050
- name: publish jacoco report
51-
if: matrix.runner == 'ubuntu-latest'
51+
if: ${{ matrix.runner == 'ubuntu-latest' && ( github.head_ref == 'coverage' || github.ref_name == 'coverage' ) }}
5252
run: validation/jacoco-aggregate.sh
5353
- uses: actions/upload-artifact@v3
54-
if: matrix.runner == 'ubuntu-latest'
54+
if: ${{ matrix.runner == 'ubuntu-latest' && ( github.head_ref == 'coverage' || github.ref_name == 'coverage' ) }}
5555
with:
5656
name: jacoco
5757
retention-days: 1
@@ -139,6 +139,7 @@ jobs:
139139
#############################################################################
140140

141141
collect_pages:
142+
if: ${{ github.head_ref == 'coverage' || github.ref_name == 'coverage' }}
142143
runs-on: ubuntu-latest
143144
needs:
144145
- build
@@ -153,6 +154,7 @@ jobs:
153154
retention-days: 7
154155

155156
deploy_pages:
157+
if: ${{ github.head_ref == 'coverage' || github.ref_name == 'coverage' }}
156158
needs: collect_pages
157159
permissions:
158160
pages: write

0 commit comments

Comments
 (0)