name: Build on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - name: Login to Docker uses: https://github.com/docker/login-action@v3 with: registry: git.nrx.sh username: ${{ secrets.docker_username }} password: ${{ secrets.docker_password }} - name: Build Docker image run: | docker build -t nrx-sh:latest . && \ docker tag nrx-sh:latest git.nrx.sh/naresh/nrx-sh:latest && \ docker push git.nrx.sh/naresh/nrx-sh:latest - name: Notify Watchtower webhook run: | curl -H "Authorization: Bearer ${{ secrets.watchtower_token }}" http://watchtower:8080/v1/update