An open-source, faster Devin alternative
TypeScript
fix workflow
Brian Reardonca5b0a33d617
diff --git a/.github/workflows/build-worker-ami.yml b/.github/workflows/build-worker-ami.ymlindex 1cabb0f3..1853e90b 100644--- a/.github/workflows/build-worker-ami.yml+++ b/.github/workflows/build-worker-ami.yml@@ -155,23 +155,20 @@ jobs:- name: Build imageenv:- # packer-plugin-azure authenticates via OIDC directly and fetches a- # FRESH GitHub OIDC token per Azure call (ARM_OIDC_REQUEST_*), so it- # survives long (>50 min) builds — unlike use_azure_cli_auth, whose- # one-shot federated client assertion expires ~5 min in and can't- # refresh, which failed the capture step with AADSTS700024.- ARM_USE_OIDC: "true"+ # Service-principal client-secret auth: a long-lived credential the+ # plugin refreshes for the WHOLE build. The prior CLI-federated session+ # cached a one-shot OIDC client assertion (~5 min) that couldn't refresh+ # and died mid-build with AADSTS700024; ARM_USE_OIDC didn't switch the+ # plugin over (it fell back to MSI → "Identity not found"). Providing+ # ARM_CLIENT_SECRET completes the SP credential so the plugin uses it.ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}+ ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}run: |# Use run number as patch version for gallery (must be integer)PATCH=${{ github.run_number }}- # GitHub's OIDC token endpoint (present because permissions: id-token: write).- export ARM_OIDC_REQUEST_TOKEN="$ACTIONS_ID_TOKEN_REQUEST_TOKEN"- export ARM_OIDC_REQUEST_URL="$ACTIONS_ID_TOKEN_REQUEST_URL"-packer build \-var "use_azure_cli_auth=false" \-var "worker_version=$VERSION" \diff --git a/deploy/packer/worker-ami.pkr.hcl b/deploy/packer/worker-ami.pkr.hclindex 5b6d71c3..703adb0f 100644--- a/deploy/packer/worker-ami.pkr.hcl+++ b/deploy/packer/worker-ami.pkr.hcl@@ -174,11 +174,11 @@ source "azure-arm" "worker" {location = var.location# Auth: local/dev uses the Azure CLI session (use_azure_cli_auth=true, the- # default). CI passes -var use_azure_cli_auth=false and provides ARM_USE_OIDC +- # ARM_CLIENT_ID/ARM_TENANT_ID + ARM_OIDC_REQUEST_TOKEN/URL so the plugin fetches- # a FRESH GitHub OIDC token per Azure auth. The CLI path caches the one-shot- # federated client assertion (valid ~5 min) and can't refresh it, so long- # (>50 min) image builds died with AADSTS700024 near the capture step.+ # default). CI passes -var use_azure_cli_auth=false and provides service-+ # principal creds via env (ARM_CLIENT_ID/ARM_CLIENT_SECRET/ARM_TENANT_ID/+ # ARM_SUBSCRIPTION_ID) — a long-lived credential the plugin refreshes for the+ # whole build. The CLI path cached a one-shot OIDC federated assertion (valid+ # ~5 min) that couldn't refresh, so long (>50 min) builds died with AADSTS700024.use_azure_cli_auth = var.use_azure_cli_auth# Base image: Ubuntu 24.04 LTS