Skip to content

Commit 75afc85

Browse files
Copilotmarkphip
andcommitted
Bump version to 3.0.1 and document GitHub Actions bypass behavior
Co-authored-by: markphip <[email protected]>
1 parent b5c85a3 commit 75afc85

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/artifacts-helper/NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ This installs [Azure Artifacts Credential Provider](https://github.com/microsoft
22
and optionally configures shims which shadow `dotnet`, `nuget`, `npm`, `yarn`, `rush`, and `pnpm`.
33
These dynamically sets an authentication token for pulling artifacts from a feed before running the command.
44

5+
## GitHub Actions / Codespaces Prebuild Support
6+
7+
**Version 3.0.1+**: The shim scripts now detect when running in a GitHub Actions environment (during Codespaces prebuild) by checking for the `ACTIONS_ID_TOKEN_REQUEST_URL` environment variable. When this variable is set, the shims bypass all Azure DevOps authentication setup and execute the real commands directly. This prevents:
8+
9+
- Unnecessary 3-minute wait for authentication helper
10+
- Installation of credential providers that aren't needed
11+
- Setting Azure DevOps-specific environment variables
12+
13+
This ensures package restore operations work seamlessly during Codespaces prebuild without interference from the Azure Artifacts authentication mechanisms.
14+
515
For `npm`, `yarn`, `rush`, and `pnpm` this requires that your `~/.npmrc` file is configured to use the ${ARTIFACTS_ACCESSTOKEN}
616
environment variable for the `authToken`. A helper script has been added that you can use to write your `~/.npmrc`
717
file during your setup process, though there are many ways you could accomplish this. To use the script, run it like

src/artifacts-helper/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Azure Artifacts Credential Helper",
33
"id": "artifacts-helper",
4-
"version": "3.0.0",
4+
"version": "3.0.1",
55
"description": "Configures Codespace to authenticate with Azure Artifact feeds",
66
"options": {
77
"nugetURIPrefixes": {

0 commit comments

Comments
 (0)