feat: use portainer hook instead of pushing image to gitea package repository
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -32,14 +32,13 @@ jobs:
|
|||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
- name: Build Docker image
|
||||||
uses: docker/login-action@v3
|
run: docker build --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) -f apps/discord-bot/Dockerfile .
|
||||||
with:
|
|
||||||
registry: git.pihkaal.me
|
|
||||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
deploy:
|
||||||
run: |
|
runs-on: ubuntu-latest
|
||||||
docker build --build-arg COMMIT_SHA=$(git rev-parse --short HEAD) -t git.pihkaal.me/pihkaal/lbf-bot:latest -f apps/discord-bot/Dockerfile .
|
needs: build
|
||||||
docker push git.pihkaal.me/pihkaal/lbf-bot:latest
|
|
||||||
|
steps:
|
||||||
|
- name: Trigger Portainer webhook
|
||||||
|
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ services:
|
|||||||
|
|
||||||
discord-bot:
|
discord-bot:
|
||||||
container_name: lbf-bot
|
container_name: lbf-bot
|
||||||
image: git.pihkaal.me/pihkaal/lbf-bot:latest
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: apps/discord-bot/Dockerfile
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
|
|||||||
Reference in New Issue
Block a user