feat: use portainer hook instead of pushing image to gitea package repository
All checks were successful
Build and Deploy / build (push) Successful in 20s
Build and Deploy / deploy (push) Successful in 1s

This commit is contained in:
2026-05-30 22:44:18 +02:00
parent 48e68f104c
commit 02155e1a9e
3 changed files with 29 additions and 30 deletions

View File

@@ -0,0 +1,28 @@
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
run: docker build .
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Trigger Portainer webhook
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"

View File

@@ -1,29 +0,0 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.pihkaal.me
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
run: |
docker build -t git.pihkaal.me/pihkaal/lilou-cat:latest .
docker push git.pihkaal.me/pihkaal/lilou-cat:latest

View File

@@ -1,7 +1,7 @@
services:
server:
container_name: lilou-cat
image: git.pihkaal.me/pihkaal/lilou-cat:latest
build: .
networks:
- web
labels: