refactor: Simplify docker-build-test.yml to mirror release workflow with dev tags

This commit is contained in:
Paul Gauthier (aider) 2025-01-11 07:16:02 -08:00
parent f72f5f6438
commit 6729570799

View file

@ -15,12 +15,9 @@ on:
branches:
- main
# copy most of these steps from release.yml, but push: false and no tags:
jobs:
build:
docker_build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -29,7 +26,7 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -39,27 +36,7 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
# First do test builds without pushing
- name: Test build Docker standard image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
target: aider
- name: Test build Docker full image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
target: aider-full
# Then build and push dev tagged images
- name: Build and push Docker standard dev image
- name: Build and push Docker images
uses: docker/build-push-action@v5
with:
context: .
@ -69,7 +46,7 @@ jobs:
tags: ${{ secrets.DOCKERHUB_USERNAME }}/aider:dev
target: aider
- name: Build and push Docker full dev image
- name: Build and push Docker full image
uses: docker/build-push-action@v5
with:
context: .