Skip to content

Commit

Permalink
fix(docker): build images for apple cpus (#1418)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced Docker image build process to support multiple platforms
(linux/amd64 and linux/arm64) for broader compatibility.
  
- **Chores**
- Improved deployment workflow to ensure controlled deployment after
successful image upload.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
antoinezanardi authored Nov 12, 2024
1 parent 19eb154 commit 8a516fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-to-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,19 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up QEMU 🏗️
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx 🏗️
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image 🐳
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: antoinezanardi/werewolves-assistant-api:${{ matrix.tag }}

deploy-to-production:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/push-on-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,19 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up QEMU 🏗️
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx 🏗️
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image 🐳
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: antoinezanardi/werewolves-assistant-api:develop

- name: Deploy to preproduction server 🚀
Expand Down

0 comments on commit 8a516fc

Please sign in to comment.