diff --git a/.github/workflows/docker-api.yml b/.github/workflows/docker-api.yml new file mode 100644 index 0000000..74d3470 --- /dev/null +++ b/.github/workflows/docker-api.yml @@ -0,0 +1,38 @@ +name: Build API + +on: + release: + types: [published] + + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_TOKEN }} + - + name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Build and push + uses: docker/build-push-action@v3 + with: + context: ./api/ + file: ./api/Dockerfile + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ secrets.DOCKER_USERNAME }}/asic-agent-api:latest