32 lines
773 B
YAML
32 lines
773 B
YAML
name: Build and Deploy
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: linux
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Docker Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: gitea.abzk.fr
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and Push Docker Image
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: gitea.abzk.fr/jarvis:latest
|
|
|
|
- name: Deploy to Portainer
|
|
run: |
|
|
curl -X POST https://portainer.abzk.fr/api/stacks/1/redeploy \
|
|
-H "X-API-Key: ${{ secrets.PORTAINER_API_KEY }}"
|