Added possibility deploy with k3s

This commit is contained in:
2026-05-19 23:27:37 +03:00
parent e6096c98fa
commit 3c9e5d3d7a
33 changed files with 283 additions and 206 deletions
+16 -15
View File
@@ -11,7 +11,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: https://gitea.com/actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -25,32 +25,33 @@ jobs:
- name: Build and push postgres image
uses: docker/build-push-action@v5
if: |
contains(github.event.commits[0].modified, 'infra/docker/postgres-pg-cron') ||
contains(github.event.commits[0].added, 'infra/docker/postgres-pg-cron')
# if: |
# contains(github.event.commits[0].modified, 'infra/postgres') ||
# contains(github.event.commits[0].added, 'infra/postgres')
with:
context: .
file: infra/docker/postgres-pg-cron/Dockerfile
file: infra/postgres/Dockerfile
push: true
tags: |
${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub-postgres:latest
cache-from: type=gha
cache-to: type=gha,mode=max
${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub-postgres:${{ github.sha }}
cache-from: type=registry,ref=${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub-postgres:cache
cache-to: type=registry,ref=${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub-postgres:cache,mode=max
- name: Build and push app image
uses: docker/build-push-action@v5
with:
context: .
file: infra/docker/application/Dockerfile
file: infra/application/Dockerfile
push: true
tags: |
${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub:latest
${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-from: type=registry,ref=${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub:cache
cache-to: type=registry,ref=${{ secrets.REGISTRY_URL }}/${{ secrets.REGISTRY_USER }}/familyhub:cache,mode=max
- name: Trigger deploy
run: |
curl -s -X POST \
-H "X-Webhook-Secret: ${{ secrets.WEBHOOK_SECRET }}" \
"http://10.0.0.2:9001/deploy?container=familyhub"
# - name: Trigger deploy
# run: |
# curl -s -X POST \
# -H "X-Webhook-Secret: ${{ secrets.WEBHOOK_SECRET }}" \
# "http://10.0.0.2:9001/deploy?container=familyhub"