Skip to content

Commit

Permalink
Remove NPM proxy variable from yarn-install action (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkezele-t authored Feb 16, 2024
1 parent 1139fe4 commit 51eb4ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-mails-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'davinci-github-actions': patch
---

- remove NPM proxy variable which does not work in composite actions
4 changes: 2 additions & 2 deletions yarn-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ runs:
# This step creates .npmrc file that references to npm registry in GAR (Google Artifact Registry)
# The npm registry works as a proxy-cache, downloading and storing the public npm packages
- name: Create .npmrc file using npm Artifact Registry
if: "inputs.checkout-token && inputs.npm-gar-token && contains(runner.name, vars.NPM_PROXY_RUNNER_NAME)"
if: "inputs.checkout-token && inputs.npm-gar-token && contains(runner.name, 'DISABLED')"
run: |
echo "registry=https://us-central1-npm.pkg.dev/toptal-ci/npm-registry/" > ${{ inputs.path }}/.npmrc &&
echo "//us-central1-npm.pkg.dev/toptal-ci/npm-registry/:username=_json_key_base64" >> ${{ inputs.path }}/.npmrc &&
Expand All @@ -110,7 +110,7 @@ runs:
# This step changes the public npm registry in yarn.lock file to npm in AR
# We still use the public npm registry to our private packages
- name: Change registry in yarn.lock file to npm Artifact Registry
if: "inputs.checkout-token && inputs.npm-gar-token && contains(runner.name, vars.NPM_PROXY_RUNNER_NAME)"
if: "inputs.checkout-token && inputs.npm-gar-token && contains(runner.name, 'DISABLED')"
run: |
sed -i -e "s#https://registry.yarnpkg.com/#https://us-central1-npm.pkg.dev/toptal-ci/npm-registry/#g" ${{ inputs.path }}/yarn.lock
sed -i -e "s#https://registry.npmjs.org/#https://us-central1-npm.pkg.dev/toptal-ci/npm-registry/#g" ${{ inputs.path }}/yarn.lock
Expand Down

0 comments on commit 51eb4ab

Please sign in to comment.