ci / docker (push) Failing after 44s
Adds a shared .gitea/scripts/komodo-deploy.sh that calls the Komodo /execute/DeployStack API after the image is pushed, then polls /read/GetUpdate until the deploy completes. A push webhook cannot do this correctly: it fires before the image exists in the registry, so Komodo would redeploy the previous :latest. - docker.yml deploys stack 'qbit-maid' (required) - docker-dev.yml deploys vars.KOMODO_STACK_DEV, skipped when unset
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev*
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
-
|
|
name: Login to Docker Hub
|
|
uses: docker/login-action@v4
|
|
with:
|
|
registry: git.jonb.io
|
|
username: '${{ gitea.actor }}'
|
|
password: '${{ secrets.JONBIO_CI }}'
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v4
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v4
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v7
|
|
with:
|
|
push: true
|
|
tags: git.jonb.io/jblu/qbit-maid:dev
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v4
|
|
-
|
|
name: Deploy to Komodo
|
|
env:
|
|
KOMODO_URL: '${{ secrets.KOMODO_URL }}'
|
|
KOMODO_API_KEY: '${{ secrets.KOMODO_API_KEY }}'
|
|
KOMODO_API_SECRET: '${{ secrets.KOMODO_API_SECRET }}'
|
|
# Set the KOMODO_STACK_DEV repository variable to your dev stack name.
|
|
# When it is empty the deploy step is skipped, so dev builds still pass.
|
|
KOMODO_TARGET: '${{ vars.KOMODO_STACK_DEV }}'
|
|
run: ./.gitea/scripts/komodo-deploy.sh
|