Fix deploy workflow: use github.* contexts (Forgejo schema)
Some checks failed
ci / Lint & typecheck (push) Successful in 30s
ci / Unit tests (push) Successful in 1m3s
deploy / build-and-deploy (push) Failing after 12s

This commit is contained in:
febux 2026-09-14 00:31:11 +03:00
parent cdc926a77c
commit ced2e1ae95

View file

@ -1,4 +1,4 @@
# Deploy: build → push → nomad job run, on every push to main. # Deploy: build → push → nomad job run, on every push to master.
# #
# Runner requirements (verify on the Forgejo VPS): # Runner requirements (verify on the Forgejo VPS):
# - job container gets the docker socket (runner config must allow # - job container gets the docker socket (runner config must allow
@ -36,8 +36,8 @@ jobs:
run: | run: |
apk add --no-cache git apk add --no-cache git
git init -q . git init -q .
git remote add origin ${{ gitea.server_url }}/${{ gitea.repository }}.git git remote add origin ${{ github.server_url }}/${{ github.repository }}.git
git fetch --depth 1 origin ${{ gitea.sha }} git fetch --depth 1 origin ${{ github.sha }}
git checkout -q FETCH_HEAD git checkout -q FETCH_HEAD
- name: Extract nomad CLI (official image; CDN is blocked here) - name: Extract nomad CLI (official image; CDN is blocked here)
@ -55,7 +55,7 @@ jobs:
- name: Build & push images (SHA tag) - name: Build & push images (SHA tag)
run: | run: |
set -e set -e
TAG="${GITEA_SHA}" TAG="${{ github.sha }}"
for name in api worker-extract worker-analyze worker-prescreen worker-billing worker-notify; do for name in api worker-extract worker-analyze worker-prescreen worker-billing worker-notify; do
image="$REGISTRY_HOST/$REGISTRY_OWNER/contract-check-$name" image="$REGISTRY_HOST/$REGISTRY_OWNER/contract-check-$name"
docker build -f "srv/$name/Dockerfile" -t "$image:$TAG" . docker build -f "srv/$name/Dockerfile" -t "$image:$TAG" .
@ -66,7 +66,7 @@ jobs:
run: | run: |
mkdir -p /tmp/nomad-tls mkdir -p /tmp/nomad-tls
echo "${{ secrets.NOMAD_CACERT }}" > /tmp/nomad-tls/ca.crt echo "${{ secrets.NOMAD_CACERT }}" > /tmp/nomad-tls/ca.crt
export IMAGE_TAG="${GITEA_SHA}" export IMAGE_TAG="${{ github.sha }}"
export NOMAD_ADDR="https://${{ vars.NOMAD_ADDR_HOST }}:4646" export NOMAD_ADDR="https://${{ vars.NOMAD_ADDR_HOST }}:4646"
export NOMAD_CACERT=/tmp/nomad-tls/ca.crt export NOMAD_CACERT=/tmp/nomad-tls/ca.crt
export NOMAD_TOKEN="${{ secrets.NOMAD_TOKEN }}" export NOMAD_TOKEN="${{ secrets.NOMAD_TOKEN }}"