diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..3fcc519 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,30 @@ +name: Build Container Image + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Build image for amd64 + uses: docker/build-push-action@v5 + with: + context: . + file: ./server/Dockerfile + platforms: linux/amd64 + push: false + tags: vultr-api-server:${{ github.sha }} + load: true + + - name: Test image + run: | + docker run --rm vultr-api-server:${{ github.sha }} python -c "from vultr_api import VultrClient; print('OK')"