Merge PR #3: deploy via Komodo stack webhook
Build and Deploy docker container / build (push) Successful in 20m12s

This commit was merged in pull request #3.
This commit is contained in:
trex Bot committed 2026-11-19 10:42:20 -06:00
commit eb0c0ba77b
1 file changed
+43 -8
+43 -8
View File
@@ -52,14 +52,49 @@ jobs:
with: with:
context: . context: .
push: true push: true
tags: 'git.jonb.io/jblu/jonbio:latest' tags: |
git.jonb.io/jblu/jonbio:latest
git.jonb.io/jblu/jonbio:${{ gitea.sha }}
cache-from: 'type=registry,ref=git.jonb.io/jblu/jonbio:buildcache' cache-from: 'type=registry,ref=git.jonb.io/jblu/jonbio:buildcache'
cache-to: >- cache-to: >-
type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max type=registry,image-manifest=true,oci-mediatypes=true,ref=git.jonb.io/jblu/jonbio:buildcache,mode=max
- name: Deploy app # Triggers the Komodo stack webhook for `jonbio`, which pulls :latest and
uses: fjogeleit/http-request-action@v1 # recreates the container. Replaces the old http://10.5.0.11:7777/v1/update
with: # hook, which no longer exists.
url: 'http://10.5.0.11:7777/v1/update' - name: Deploy via Komodo
method: GET env:
bearerToken: '${{ secrets.DEPLOYTOKEN }}' KOMODO_WEBHOOK_SECRET: ${{ secrets.KOMODO_JONBIO_WEBHOOK_SECRET }}
timeout: 60000 COMMIT_SHA: ${{ gitea.sha }}
run: |
if [ -z "$KOMODO_WEBHOOK_SECRET" ]; then
echo "::error::KOMODO_JONBIO_WEBHOOK_SECRET is not set on this repo"
exit 1
fi
cat > /tmp/komodo-deploy.mjs <<'EOF'
import crypto from 'node:crypto'
const payload = JSON.stringify({
ref: 'refs/heads/main',
after: process.env.COMMIT_SHA,
repository: { full_name: 'jblu/jonbio', default_branch: 'main' },
})
const signature =
'sha256=' +
crypto.createHmac('sha256', process.env.KOMODO_WEBHOOK_SECRET).update(payload).digest('hex')
const res = await fetch('http://10.5.0.3:9120/listener/github/stack/jonbio/deploy', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-GitHub-Event': 'push',
'X-Hub-Signature-256': signature,
},
body: payload,
})
const body = await res.text()
console.log(`Komodo deploy -> ${res.status} ${body}`)
if (!res.ok) process.exit(1)
EOF
node /tmp/komodo-deploy.mjs