Build and Push voltaserve/api #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push voltaserve/api | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "api/**" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "api/**" | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set Up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64, amd64 | |
- name: Set Up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and Push Docker Image | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./api | |
push: true | |
tags: voltaserve/api:latest | |
platforms: linux/amd64,linux/arm64 |