Files
Smartwave/.github/workflows/deploy.yaml
T
Ninluc 4a3c4b8c96
Build, push image, and notify Watchtower / build-image (push) Failing after 55s
Build, push image, and notify Watchtower / notify (push) Has been skipped
Misc. CICD fixes
2026-07-16 17:16:35 +02:00

39 lines
1.2 KiB
YAML

name: Build, push image, and notify Watchtower
on:
push:
branches:
- main # Only triggers the build on the main branch
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.matthiasg.dev
username: ninluc
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: buildx-cache-${{ github.sha }}
restore-keys: |
buildx-cache-
- name: Build and push Docker image
run: |
docker build --file cloud/Dockerfile -t git.matthiasg.dev/ninluc/smartwave-api:latest .
docker push --file cloud/Dockerfile git.matthiasg.dev/ninluc/smartwave-api:latest
notify:
needs: build-image
runs-on: ubuntu-latest
steps:
- name: Notify Watchtower
run: "curl -i -X POST -H \"Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}\" https://watchtower.smartwave.matthiasg.dev/v1/update"