diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index ac6600d..85fb425 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image +name: Build and Deploy on: push: @@ -32,14 +32,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Log in to DockerHub - uses: docker/login-action@v3 - with: - registry: git.pihkaal.me - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_PASSWORD }} + - name: Build Docker image + run: docker build --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) -f apps/discord-bot/Dockerfile . - - name: Build and push Docker image - run: | - docker build --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) -t git.pihkaal.me/pihkaal/lbf-bot:latest -f apps/discord-bot/Dockerfile . - docker push git.pihkaal.me/pihkaal/lbf-bot:latest + deploy: + runs-on: ubuntu-latest + needs: build + + steps: + - name: Trigger Portainer webhook + run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}" diff --git a/docker-compose.yml b/docker-compose.yml index dbc8eeb..4ac9e33 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,9 @@ services: discord-bot: container_name: lbf-bot - image: git.pihkaal.me/pihkaal/lbf-bot:latest + build: + context: . + dockerfile: apps/discord-bot/Dockerfile restart: unless-stopped depends_on: postgres: