Skip to content

Commit 7b8bd4d

Browse files
authored
[CI] Build up-to-date Docker image version on pre-commit (#582)
- pre-commit job only build the docker image to verify whether it is working well - post-commit stage (on master branch only) builds the final version and pushes to the registry under the `latest` version
1 parent 595736a commit 7b8bd4d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
paths:
66
- 'docker/**'
77
- '.github/workflows/docker.yml'
8-
pull_request_target:
8+
pull_request:
99
paths:
1010
- 'docker/**'
1111
- '.github/workflows/docker.yml'
@@ -33,6 +33,7 @@ jobs:
3333
uses: docker/setup-buildx-action@v3
3434

3535
- name: Log in to GHCR
36+
if: github.event_name == 'push'
3637
uses: docker/login-action@v3
3738
with:
3839
registry: ghcr.io

0 commit comments

Comments
 (0)