File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 66 paths :
77 - ' Dockerfile.base'
88 - ' .github/workflows/build_base_image.yml'
9+ pull_request :
10+ branches : [main, master, develop]
11+ paths :
12+ - ' Dockerfile.base'
13+ - ' .github/workflows/build_base_image.yml'
914 workflow_dispatch :
1015
1116jobs :
2530 uses : docker/setup-buildx-action@v3
2631
2732 - name : Log in to GitHub Container Registry
33+ if : github.event_name != 'pull_request'
2834 uses : docker/login-action@v3
2935 with :
3036 registry : ghcr.io
4147 run : |
4248 echo "PYVER_SHORT=$(echo ${{ matrix.pyver }} | cut -d'.' -f1,2)" >> $GITHUB_OUTPUT
4349
44- - name : Build and push base image
50+ - name : Build and push base image (on push)
51+ if : github.event_name != 'pull_request'
4552 uses : docker/build-push-action@v5
4653 with :
4754 context : .
5057 build-args : |
5158 PYTHON_VERSION=${{ matrix.pyver }}
5259 tags : |
53- ghcr.io/${{ steps.repo.outputs.REPO }}-base:${{ steps.pyver_short.outputs.PYVER_SHORT }}-latest
60+ ghcr.io/${{ steps.repo.outputs.REPO }}-base:${{ steps.pyver_short.outputs.PYVER_SHORT }}-latest
61+
62+ - name : Build base image (on PR)
63+ if : github.event_name == 'pull_request'
64+ uses : docker/build-push-action@v5
65+ with :
66+ context : .
67+ file : Dockerfile.base
68+ push : false
69+ build-args : |
70+ PYTHON_VERSION=${{ matrix.pyver }}
71+ tags : |
72+ ghcr.io/${{ steps.repo.outputs.REPO }}-base:${{ steps.pyver_short.outputs.PYVER_SHORT }}-pr-test
You can’t perform that action at this time.
0 commit comments