diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..0c3ef629 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build Workflow +on: + push: + tags: # Build on tag creation (any) + - * +jobs: + test-n-lint: + uses: ./.github/workflows/test-n-lint.yml + build: + name: Build the image + runs-on: ubuntu-latest + needs: [test] # Requires "Test & Lint" workflow to succeed + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: ${{ vars.DOCKERHUB_PROJECT }}:latest + cache-from: type=gha + cache-to: type=gha,mode=max