Skip to content

Commit 71c7c9b

Browse files
committed
Add pull request run condition
1 parent d9eafba commit 71c7c9b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/docker.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Docker CI
22

3-
on: push
3+
on: [push, pull_request]
44

55
env:
66
REGISTRY: ghcr.io
@@ -17,8 +17,9 @@ jobs:
1717
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/plato-${{ matrix.purpose }}
1818

1919
# Experiments:
20-
# [] Can I read env.IMAGE_NAME?
21-
# [] Can I print git event name?
20+
# [x] Can I read env.IMAGE_NAME?
21+
# [x] Can I print git event name?
22+
# [] Can I recognize pull requests?
2223
# [] Can I use if conditions for steps?
2324

2425
steps:
@@ -28,4 +29,3 @@ jobs:
2829
echo ${{ env.IMAGE_NAME }}
2930
echo ${{ github.event_name }}
3031
echo ${{ github.event_name != 'pull_request' }}
31-
docker image history ${{ env.IMAGE_NAME }}

0 commit comments

Comments
 (0)