ci: use bun for convex deploy
This commit is contained in:
parent
0f8e9f0071
commit
a7a7c30d0e
1 changed files with 12 additions and 14 deletions
26
.github/workflows/ci-cd-web-desktop.yml
vendored
26
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -387,17 +387,16 @@ jobs:
|
||||||
docker run --rm -i \
|
docker run --rm -i \
|
||||||
-v "$EFFECTIVE_APP_DIR":/app \
|
-v "$EFFECTIVE_APP_DIR":/app \
|
||||||
-w /app \
|
-w /app \
|
||||||
-e PNPM_STORE_DIR=/tmp/pnpm-store \
|
|
||||||
-e CONVEX_SELF_HOSTED_URL \
|
-e CONVEX_SELF_HOSTED_URL \
|
||||||
-e CONVEX_SELF_HOSTED_ADMIN_KEY \
|
-e CONVEX_SELF_HOSTED_ADMIN_KEY \
|
||||||
-e MACHINE_PROVISIONING_SECRET \
|
-e MACHINE_PROVISIONING_SECRET \
|
||||||
-e MACHINE_TOKEN_TTL_MS \
|
-e MACHINE_TOKEN_TTL_MS \
|
||||||
-e FLEET_SYNC_SECRET \
|
-e FLEET_SYNC_SECRET \
|
||||||
node:20-bullseye bash -lc "set -euo pipefail; corepack enable; corepack prepare pnpm@10.20.0 --activate; mkdir -p \"${PNPM_STORE_DIR:-/tmp/pnpm-store}\"; pnpm config set store-dir \"${PNPM_STORE_DIR:-/tmp/pnpm-store}\"; pnpm install --frozen-lockfile --prod=false; \
|
node:20-bullseye bash -lc "set -euo pipefail; curl -fsSL https://bun.sh/install | bash >/tmp/bun-install.log; export BUN_INSTALL=\"\${BUN_INSTALL:-/root/.bun}\"; export PATH=\"\$BUN_INSTALL/bin:\$PATH\"; bun install --frozen-lockfile; \
|
||||||
if [ -n \"$MACHINE_PROVISIONING_SECRET\" ]; then pnpm exec convex env set MACHINE_PROVISIONING_SECRET \"$MACHINE_PROVISIONING_SECRET\" -y; fi; \
|
if [ -n \"$MACHINE_PROVISIONING_SECRET\" ]; then bunx convex env set MACHINE_PROVISIONING_SECRET \"$MACHINE_PROVISIONING_SECRET\" -y; fi; \
|
||||||
if [ -n \"$MACHINE_TOKEN_TTL_MS\" ]; then pnpm exec convex env set MACHINE_TOKEN_TTL_MS \"$MACHINE_TOKEN_TTL_MS\" -y; fi; \
|
if [ -n \"$MACHINE_TOKEN_TTL_MS\" ]; then bunx convex env set MACHINE_TOKEN_TTL_MS \"$MACHINE_TOKEN_TTL_MS\" -y; fi; \
|
||||||
if [ -n \"$FLEET_SYNC_SECRET\" ]; then pnpm exec convex env set FLEET_SYNC_SECRET \"$FLEET_SYNC_SECRET\" -y; fi; \
|
if [ -n \"$FLEET_SYNC_SECRET\" ]; then bunx convex env set FLEET_SYNC_SECRET \"$FLEET_SYNC_SECRET\" -y; fi; \
|
||||||
pnpm exec convex env list"
|
bunx convex env list"
|
||||||
|
|
||||||
- name: Ensure .env is not present for Convex deploy
|
- name: Ensure .env is not present for Convex deploy
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -414,11 +413,10 @@ jobs:
|
||||||
docker run --rm -i \
|
docker run --rm -i \
|
||||||
-v "$EFFECTIVE_APP_DIR":/app \
|
-v "$EFFECTIVE_APP_DIR":/app \
|
||||||
-w /app \
|
-w /app \
|
||||||
-e PNPM_STORE_DIR=/tmp/pnpm-store \
|
|
||||||
-e CI=true \
|
-e CI=true \
|
||||||
-e CONVEX_SELF_HOSTED_URL \
|
-e CONVEX_SELF_HOSTED_URL \
|
||||||
-e CONVEX_SELF_HOSTED_ADMIN_KEY \
|
-e CONVEX_SELF_HOSTED_ADMIN_KEY \
|
||||||
node:20-bullseye bash -lc "set -euo pipefail; corepack enable; corepack prepare pnpm@10.20.0 --activate; mkdir -p \"${PNPM_STORE_DIR:-/tmp/pnpm-store}\"; pnpm config set store-dir \"${PNPM_STORE_DIR:-/tmp/pnpm-store}\"; pnpm install --frozen-lockfile --prod=false; pnpm exec convex deploy"
|
node:20-bullseye bash -lc "set -euo pipefail; curl -fsSL https://bun.sh/install | bash >/tmp/bun-install.log; export BUN_INSTALL=\"\${BUN_INSTALL:-/root/.bun}\"; export PATH=\"\$BUN_INSTALL/bin:\$PATH\"; bun install --frozen-lockfile; bunx convex deploy"
|
||||||
|
|
||||||
- name: Cleanup old convex build workdirs (keep last 2)
|
- name: Cleanup old convex build workdirs (keep last 2)
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -520,12 +518,12 @@ jobs:
|
||||||
-v /srv/apps/sistema:/app -w /app \
|
-v /srv/apps/sistema:/app -w /app \
|
||||||
-e CONVEX_SELF_HOSTED_URL -e CONVEX_SELF_HOSTED_ADMIN_KEY="$ADMIN_KEY" \
|
-e CONVEX_SELF_HOSTED_URL -e CONVEX_SELF_HOSTED_ADMIN_KEY="$ADMIN_KEY" \
|
||||||
-e MACHINE_PROVISIONING_SECRET -e MACHINE_TOKEN_TTL_MS -e FLEET_SYNC_SECRET \
|
-e MACHINE_PROVISIONING_SECRET -e MACHINE_TOKEN_TTL_MS -e FLEET_SYNC_SECRET \
|
||||||
node:20-bullseye bash -lc "set -euo pipefail; corepack enable; corepack prepare pnpm@10.20.0 --activate; pnpm i --frozen-lockfile --prod=false; \
|
node:20-bullseye bash -lc "set -euo pipefail; curl -fsSL https://bun.sh/install | bash >/tmp/bun-install.log; export BUN_INSTALL=\"\${BUN_INSTALL:-/root/.bun}\"; export PATH=\"\$BUN_INSTALL/bin:\$PATH\"; bun install --frozen-lockfile; \
|
||||||
unset CONVEX_DEPLOYMENT; pnpm exec convex env list; \
|
unset CONVEX_DEPLOYMENT; bunx convex env list; \
|
||||||
if [ -n \"$MACHINE_PROVISIONING_SECRET\" ]; then pnpm exec convex env set MACHINE_PROVISIONING_SECRET \"$MACHINE_PROVISIONING_SECRET\" -y; fi; \
|
if [ -n \"$MACHINE_PROVISIONING_SECRET\" ]; then bunx convex env set MACHINE_PROVISIONING_SECRET \"$MACHINE_PROVISIONING_SECRET\" -y; fi; \
|
||||||
if [ -n \"$MACHINE_TOKEN_TTL_MS\" ]; then pnpm exec convex env set MACHINE_TOKEN_TTL_MS \"$MACHINE_TOKEN_TTL_MS\" -y; fi; \
|
if [ -n \"$MACHINE_TOKEN_TTL_MS\" ]; then bunx convex env set MACHINE_TOKEN_TTL_MS \"$MACHINE_TOKEN_TTL_MS\" -y; fi; \
|
||||||
if [ -n \"$FLEET_SYNC_SECRET\" ]; then pnpm exec convex env set FLEET_SYNC_SECRET \"$FLEET_SYNC_SECRET\" -y; fi; \
|
if [ -n \"$FLEET_SYNC_SECRET\" ]; then bunx convex env set FLEET_SYNC_SECRET \"$FLEET_SYNC_SECRET\" -y; fi; \
|
||||||
pnpm exec convex env list"
|
bunx convex env list"
|
||||||
- name: Test register from runner
|
- name: Test register from runner
|
||||||
run: |
|
run: |
|
||||||
HOST="vm-teste-$(date +%s)"
|
HOST="vm-teste-$(date +%s)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue