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

This commit is contained in:
2026-05-30 23:25:50 +02:00
parent f34730b609
commit 27cb044247
15 changed files with 411 additions and 88 deletions

View File

@@ -1,34 +0,0 @@
name: ci
on: push
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [22]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm run lint
- name: Typecheck
run: pnpm run typecheck

View File

@@ -1,4 +1,4 @@
name: Build and Push Docker Image
name: Deploy
on:
push:
@@ -11,24 +11,40 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm run lint
- name: Typecheck
run: pnpm run typecheck
- 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
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: git.pihkaal.me/pihkaal/pihka-al:latest
cache-from: type=registry,ref=git.pihkaal.me/pihkaal/pihka-al:cache
cache-to: type=registry,ref=git.pihkaal.me/pihkaal/pihka-al:cache,mode=max
push: false
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Trigger Portainer webhook
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_URL }}"