Update deploy.yml
Some checks failed
ci / Lint & typecheck (push) Successful in 30s
ci / Unit tests (push) Successful in 1m3s
deploy / build-and-deploy (push) Failing after 18s

This commit is contained in:
febux 2026-09-14 02:01:27 +03:00
parent 62c3660e65
commit 204979456e

View file

@ -64,15 +64,23 @@ jobs:
# container via `docker cp` (tar stream) — NOT bind mounts, because # container via `docker cp` (tar stream) — NOT bind mounts, because
# the workspace lives in the job container's overlay, not on the DinD # the workspace lives in the job container's overlay, not on the DinD
# daemon's host filesystem (bind sources resolve daemon-side). # daemon's host filesystem (bind sources resolve daemon-side).
env:
NOMAD_ADDR_HOST: ${{ vars.NOMAD_ADDR_HOST }}
NOMAD_TOKEN: ${{ secrets.NOMAD_TOKEN }}
NOMAD_CACERT: ${{ secrets.NOMAD_CACERT }}
run: | run: |
[ -n "$NOMAD_ADDR_HOST" ] || { echo "NOMAD_ADDR_HOST variable is empty"; exit 1; }
[ -n "$NOMAD_TOKEN" ] || { echo "NOMAD_TOKEN secret is empty"; exit 1; }
[ -n "$NOMAD_CACERT" ] || { echo "NOMAD_CACERT secret is empty"; exit 1; }
mkdir -p .ci-tls mkdir -p .ci-tls
printf '%s\n' "${{ secrets.NOMAD_CACERT }}" > .ci-tls/ca.crt printf '%s\n' "$NOMAD_CACERT" > .ci-tls/ca.crt
docker create --name nomad-deploy \ docker create --name nomad-deploy \
-e IMAGE_TAG="${{ github.sha }}" \ -e IMAGE_TAG="${{ github.sha }}" \
-e NOMAD_ADDR="https://${{ vars.NOMAD_ADDR_HOST }}:4646" \ -e NOMAD_ADDR="https://$NOMAD_ADDR_HOST:4646" \
-e NOMAD_CACERT=/tmp/ca.crt \ -e NOMAD_CACERT=/tmp/ca.crt \
-e NOMAD_TOKEN="${{ secrets.NOMAD_TOKEN }}" \ -e NOMAD_TOKEN="$NOMAD_TOKEN" \
--entrypoint /bin/nomad \ --entrypoint /bin/nomad \
hashicorp/nomad:1.9 job run /tmp/job.hcl hashicorp/nomad:1.9 job run /tmp/job.hcl