#
# .gitea/workflows/gitea-ci.yaml
#

name: Build And Push
run-name: ${{ gitea.actor }} is runs ci pipeline
on: [ push ]

jobs:
  release-image:
    runs-on: cth-ubuntu-latest
    if: gitea.ref == 'refs/heads/main'
    steps:
      - name: Set up Docker BuildX
        uses: https://github.com/docker/setup-buildx-action@v3
        with: # replace it with your local IP
          config-inline: |
            [registry."registry.tuxnet.lan"] 
              http = true
              insecure = true

      - name: Build and push
        uses: https://github.com/docker/build-push-action@v5
        with:
          context: .
          file: ./Dockerfile
          platforms: |
            linux/amd64                       
          push: true
          tags: | # replace it with your local IP and tags
            registry.tuxnet.lan/web/dokuwiki:20240206.2.0-debian-12-r3