Skip to content

Commit

Permalink
restore release.yml, do multi arch build in docker-build-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-gauthier committed Oct 31, 2023
1 parent 982c58a commit 702fc0c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,30 @@ on:
branches:
- main

# copy most of these steps from release.yml, but push: false and no tags:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out repository
- name: Checkout code
uses: actions/checkout@v3

- name: Build Docker image
run: |
docker build -t myapp:latest . -f docker/Dockerfile
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: false
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
#twine upload dist/*
twine upload dist/*
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -46,8 +46,8 @@ jobs:
with:
context: .
file: ./docker/Dockerfile
platforms: linux/arm64
push: false
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/aider:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/aider:latest

0 comments on commit 702fc0c

Please sign in to comment.