Skip to content

Commit 6fc2fad

Browse files
committed
check if is pr
1 parent 51c47f6 commit 6fc2fad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,13 @@ jobs:
260260
- name: Checkout Repository
261261
uses: actions/checkout@v3
262262

263+
- name: Check If Is PR
264+
id: is_pr
265+
run: |
266+
if [[ "${{ github.event_name }}" != 'pull_request' ]]; then
267+
echo "::set-output name=sha::type=sha,format=short,prefix="
268+
fi
269+
263270
- name: Extract metadata (tags, labels) for Docker
264271
id: meta
265272
uses: docker/metadata-action@e5622373a38e60fb6d795a4421e56882f2d7a681
@@ -268,6 +275,7 @@ jobs:
268275
tags: |
269276
type=ref,event=pr
270277
type=ref,event=branch
278+
${{ steps.is_pr.outputs.sha }}
271279
272280
- name: Extract Tag
273281
id: meta2

0 commit comments

Comments
 (0)