Skip to content

ci: OIDC-only private feed, drop PAT from Copilot setup, simplify dev image push - #1735

Open
BenjaminMichaelis wants to merge 2 commits into
mainfrom
ci/feed-oidc-only-simplify-push
Open

BenjaminMichaelis wants to merge 2 commits into
mainfrom
ci/feed-oidc-only-simplify-push

Conversation

@BenjaminMichaelis

@BenjaminMichaelis BenjaminMichaelis commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #1729.

What changes

Private feed: OIDC only, and only where it's needed

  • The first main run after ci: harden Actions and Dependabot supply chain (SHA pins, automerge binding, cooldown, feed OIDC, cache split, digest promotion) #1729 signed in with OIDC and built the image with the token. This PR removes the AZURE_DEVOPS_PAT fallback and makes scripts/nuget/get-feed-token.sh OIDC-only.
  • The host restore, build and tests in build-and-test use placeholder content (AccessToNugetFeed=false); the post-merge log has no ContentFeedNuget references outside the container build. Their Azure login and feed-credentials steps are gone, and they share the public NuGet cache with PR builds. Only the container build signs in.
  • Copilot setup steps: removed the private-feed source and PAT. Their restore never pulls the private package, and they use the public cache.

Simpler build and deploy

  • Dev image push: reads the pushed digest directly; no az acr re-read of the tag.
  • Production import: no post-import tag re-read. Every later step deploys by digest.
  • Removed the "Cancel pending deployment workflow runs" script. It cancelled 0 runs in each of the last 4 production deploys, and the deploy-production concurrency group already serializes deploys. This also drops actions: write.
  • Removed the Azure logout steps (azure/CLI pulled a container just to run az logout). GitHub-hosted runners are discarded after each job.
  • Removed fetch-depth: 0 from the production checkout, which tagging HEAD doesn't need, and a dead pull_request condition on the container build.
  • PR test steps merged into one with conditional coverage arguments. The Node version check runs on one frontend leg only.

actionlint passes on both changed workflows. Net: about 200 fewer lines.

After merge

  • Delete the now-unused AZURE_DEVOPS_PAT copies: the Actions repository secret and the copilot environment secret.
  • The PAT itself stays for now, as Dependabot secrets only (AZURE_DEVOPS_PAT and AZURE_DEVOPS_PAT_USERNAME) for the private registry in dependabot.yml. Dependabot supports OIDC for Azure DevOps, but GitHub doesn't document the subject its token presents, so moving it needs a short trial. After that, the PAT can be revoked.

🤖 Generated with Claude Code

BenjaminMichaelis and others added 2 commits November 26, 2026 14:05
OIDC sign-in for the private NuGet feed worked on the first main run after
#1729, so remove the AZURE_DEVOPS_PAT fallback from build-and-test and make
get-feed-token.sh OIDC-only.

Copilot setup steps: drop the private-feed source and PAT. Their restore never
sets AccessToNugetFeed (default false), so the private package is never
referenced; use the same public NuGet cache as PR builds.

Dev image push: read the pushed digest directly with index .RepoDigests 0 and
drop the extra ACR re-read of the tag. Every later step deploys by digest, so
a tag moving afterwards cannot change what is deployed.

Dependabot's private registry still uses the PAT (Dependabot secrets): its
OIDC subject is not documented, so it moves in a separate change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- build-and-test: the host restore, build and tests use placeholder content
  (AccessToNugetFeed=false), so drop their Azure login and feed credentials
  steps and share the public NuGet cache with PR builds. Only the container
  build signs in for the private feed.
- Drop the dead pull_request condition on the container build step (the job
  only runs on push and workflow_dispatch).
- deploy-production: drop the cancel-queued-runs script (it cancelled 0 runs
  in every recent deploy; the deploy-production concurrency group already
  serializes deploys) and with it the actions: write permission; drop
  fetch-depth: 0 (tagging HEAD needs no history); drop the post-import tag
  re-read (later steps deploy by digest).
- Remove the Azure logout steps; GitHub-hosted runners are discarded after
  each job.
- pr-build-and-test: one test step with conditional coverage arguments.
- frontend-build: check the Node version on one matrix leg only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant