mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 12:24:59 +00:00
feat: Modify Docker workflow to separate PR and push build steps
This commit is contained in:
parent
a06f4dfad6
commit
9822a6ed5d
1 changed files with 26 additions and 4 deletions
30
.github/workflows/docker-build-test.yml
vendored
30
.github/workflows/docker-build-test.yml
vendored
|
@ -42,22 +42,44 @@ jobs:
|
|||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
- name: Build Docker images (PR)
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: false
|
||||
target: aider
|
||||
|
||||
- name: Build Docker images (Push)
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:dev
|
||||
target: aider
|
||||
|
||||
- name: Build and push Docker full image
|
||||
- name: Build Docker full image (PR)
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
push: false
|
||||
target: aider-full
|
||||
|
||||
- name: Build Docker full image (Push)
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider-full:dev
|
||||
target: aider-full
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue