Skip to content

Commit 2564a43

Browse files
committed
Use head_ref when relevant
1 parent e40ebd0 commit 2564a43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
path: ${{env.share_local_bin}}
9292

9393
- name: Save exes for share-task-runner docker build
94-
if: ${{ startsWith(github.ref, 'refs/heads/task-') }}
94+
if: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/task-')) || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'task-')) }}
9595
uses: actions/upload-artifact@v4
9696
with:
9797
name: share-task-runner-exe
@@ -107,7 +107,7 @@ jobs:
107107

108108
# Separate jobs for the docker builds because they requires elevated github token permissions.
109109
share-task-runner-docker-build:
110-
if: ${{ startsWith(github.ref, 'refs/heads/task-') }}
110+
if: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/heads/task-')) || (github.event_name == 'pull_request' && startsWith(github.head_ref, 'task-')) }}
111111
env:
112112
container_registry: ghcr.io
113113
docker_image_name: unisoncomputing/share-task-runner

0 commit comments

Comments
 (0)