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

This commit is contained in:
2026-05-31 00:03:49 +02:00
parent a0427ce1e9
commit 915a466310
2 changed files with 33 additions and 30 deletions

View File

@@ -0,0 +1,33 @@
name: Deploy
on:
push:
branches:
- main
workflow_dispatch:
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: Redeploy Portainer stack
run: |
curl -X POST "${{ vars.PORTAINER_URL }}/api/stacks/${{ vars.PORTAINER_STACK_ID }}/git/redeploy?endpointId=${{ vars.PORTAINER_ENDPOINT_ID }}" \
-H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"pullImage": true}'