Skip to content

Commit a4f11c2

Browse files
committed
skip dock step when Dockerfile not present
1 parent 247e042 commit a4f11c2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/pr_check.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ jobs:
2121
runs-on: ubuntu-24.04
2222
outputs:
2323
matrix: ${{ steps.set.outputs.matrix }}
24+
dockerfile_exists: ${{ steps.dockerfile.outputs.exists }}
2425
steps:
2526
- name: Set Matrix Bioconductor Version
2627
id: set
2728
run: |
2829
MATRIX="{\"include\":[{\"bioc_version\":\"$GITHUB_REF_NAME\"}]}"
2930
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
31+
- name: Check for Dockerfile
32+
id: dockerfile
33+
run: |
34+
echo "exists=$( [ -f ./inst/docker/pkg/Dockerfile ] && echo true || echo false )" >> $GITHUB_OUTPUT
3035
3136
check:
3237
needs: set-matrix
@@ -48,7 +53,6 @@ jobs:
4853
shell: Rscript {0}
4954

5055
- name: Cache R packages
51-
if: runner.os != 'Windows'
5256
uses: actions/cache@v4
5357
with:
5458
path: /usr/local/lib/R/site-library
@@ -117,9 +121,11 @@ jobs:
117121
path: docs
118122

119123
dock:
120-
if: ${{ github.ref == 'refs/heads/devel' }}
124+
needs:
125+
- check
126+
- set-matrix
121127
runs-on: ubuntu-24.04
122-
needs: check
128+
if: ${{ github.ref == 'refs/heads/devel' && needs.set-matrix.outputs.dockerfile_exists == 'true' }}
123129
steps:
124130
- name: Checkout Repository
125131
if: ${{ success() && github.event_name != 'pull_request' }}
@@ -162,3 +168,4 @@ jobs:
162168
if: ${{ github.ref == format('refs/heads/{0}', env.BIOC_RELEASE) && github.event_name != 'pull_request' }}
163169
id: deployment
164170
uses: actions/deploy-pages@v4
171+

0 commit comments

Comments
 (0)