@@ -42,22 +42,44 @@ jobs:
4242 username : ${{ secrets.DOCKERHUB_USERNAME }}
4343 password : ${{ secrets.DOCKERHUB_PASSWORD }}
4444
45- - name : Build and push Docker images
45+ - name : Build Docker images (PR)
46+ if : github.event_name == 'pull_request'
4647 uses : docker/build-push-action@v5
4748 with :
4849 context : .
4950 file : ./docker/Dockerfile
5051 platforms : linux/amd64,linux/arm64
51- push : ${{ github.event_name != 'pull_request' }}
52+ push : false
53+ target : aider
54+
55+ - name : Build Docker images (Push)
56+ if : github.event_name != 'pull_request'
57+ uses : docker/build-push-action@v5
58+ with :
59+ context : .
60+ file : ./docker/Dockerfile
61+ platforms : linux/amd64,linux/arm64
62+ push : true
5263 tags : ${{ secrets.DOCKERHUB_USERNAME }}/aider:dev
5364 target : aider
5465
55- - name : Build and push Docker full image
66+ - name : Build Docker full image (PR)
67+ if : github.event_name == 'pull_request'
68+ uses : docker/build-push-action@v5
69+ with :
70+ context : .
71+ file : ./docker/Dockerfile
72+ platforms : linux/amd64,linux/arm64
73+ push : false
74+ target : aider-full
75+
76+ - name : Build Docker full image (Push)
77+ if : github.event_name != 'pull_request'
5678 uses : docker/build-push-action@v5
5779 with :
5880 context : .
5981 file : ./docker/Dockerfile
6082 platforms : linux/amd64,linux/arm64
61- push : ${{ github.event_name != 'pull_request' }}
83+ push : true
6284 tags : ${{ secrets.DOCKERHUB_USERNAME }}/aider-full:dev
6385 target : aider-full
0 commit comments