diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 00000000..e8870ef8 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,36 @@ +name: Build Docker Images, Push to Registry, and Deploy + +on: push + +jobs: + build-and-push-amd64: + runs-on: ubuntu-latest + steps: + - name: Check out the private Ops repo + uses: actions/checkout@v4 + with: + token: ${{ secrets.GH_TOKEN }} + submodules: "recursive" + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + version: "lab:latest" + driver: cloud + endpoint: "lunary/lunary" + + - name: Build test + uses: docker/build-push-action@v5 + with: + context: . + file: ./ops/backend.Dockerfile + push: true + tags: | + lunary/backend:test + platforms: linux/amd64