ci: add gitea actions deploy workflow
Some checks failed
Build and deploy / build-deploy (push) Failing after 6s

This commit is contained in:
Ola
2026-05-22 21:15:15 +02:00
parent 698029b3d4
commit 3bec67ae49

View File

@@ -0,0 +1,38 @@
name: Build and deploy
on:
push:
branches: [main]
workflow_dispatch:
env:
IMAGE: gitea.mystmec.com/ola/boka-gasol247
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Gitea Container Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login gitea.mystmec.com \
-u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: Build image
run: |
docker build \
-t "$IMAGE:latest" \
-t "$IMAGE:${{ github.sha }}" \
.
- name: Push image
run: |
docker push "$IMAGE:latest"
docker push "$IMAGE:${{ github.sha }}"
- name: Deploy
run: |
cd /host-stacks/gas-mystmec
docker compose pull
docker compose up -d