Skip to content

Commit 9e9fb99

Browse files
Add support for specifying a UPM_REGISTRY_USER (#299)
* Add ability to specify UPM_REGISTRY_USER * Add comment to trigger workflow * Run build * Add workflow_dispatch for main.yml * Use UNITY_SERIAL * Add echo for PRIVATE_REGISTRY_USER * Revert to unity license
1 parent 61fd9aa commit 9e9fb99

5 files changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Actions 😎
22
on:
33
push:
4+
workflow_dispatch:
45

56
concurrency:
67
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}

dist/index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/platforms/ubuntu/run_tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ if [ -n "$PRIVATE_REGISTRY_TOKEN" ]; then
5353
token = "$PRIVATE_REGISTRY_TOKEN"
5454
alwaysAuth = true
5555
EOF
56+
# Some npm repositories (Azure Devops) require a user to be configred
57+
# even if it isn't a valid one.
58+
if [ -n "$PRIVATE_REGISTRY_USER" ]; then
59+
echo "Adding user = $PRIVATE_REGISTRY_USER"
60+
cat >> "$UPM_CONFIG_TOML_PATH" <<EOF
61+
user = "$PRIVATE_REGISTRY_USER"
62+
EOF
63+
fi
5664
fi
5765

5866
#

src/model/image-environment-factory.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class ImageEnvironmentFactory {
4141
{ name: 'SCOPED_REGISTRY_URL', value: parameters.scopedRegistryUrl },
4242
{ name: 'REGISTRY_SCOPES', value: parameters.registryScopes },
4343
{ name: 'PRIVATE_REGISTRY_TOKEN', value: process.env.UPM_REGISTRY_TOKEN },
44+
{ name: 'PRIVATE_REGISTRY_USER', value: process.env.UPM_REGISTRY_USER },
4445
{ name: 'GIT_PRIVATE_TOKEN', value: parameters.gitPrivateToken },
4546
{ name: 'VERSION', value: parameters.buildVersion },
4647
{ name: 'CUSTOM_PARAMETERS', value: parameters.customParameters },

0 commit comments

Comments
 (0)