Files
Pihkaal 915a466310
All checks were successful
Deploy / build (push) Successful in 37s
Deploy / deploy (push) Successful in 1s
feat: use portainer hook instead of pushing image to gitea package repository
2026-05-31 00:03:49 +02:00

34 lines
757 B
YAML

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}'