diff --git a/.gitea/workflows/gitea-ci.yaml b/.gitea/workflows/gitea-ci.yaml index 520372b..b11eb3d 100644 --- a/.gitea/workflows/gitea-ci.yaml +++ b/.gitea/workflows/gitea-ci.yaml @@ -20,4 +20,25 @@ jobs: go-version: '1.24' - run: go version - run: ls -lha - - run: go build -v ./... \ No newline at end of file + - run: go build -v ./... + + publish: + needs: build + runs-on: ubuntu-latest + if: gitea.ref == 'refs/heads/main' + steps: + - uses: https://github.com/actions/checkout@v6 + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + config-inline: | + [git.hnrx.net] + username = ${{ secrets.DOCKER_USERNAME }} + password = ${{ secrets.DOCKER_PASSWORD }} + - name: Build and Push Docker Image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: git.hnrx.net/homelab/manage-servers:latest + file: ./Dockerfile \ No newline at end of file