Skip to content

Commit 3e6ded0

Browse files
authored
[NO-JIRA] Fixing issue with yarn install and Minor Changes (#388)
1 parent 901aceb commit 3e6ded0

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.changeset/ninety-rules-whisper.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'davinci-github-actions': minor
3+
---
4+
5+
- fix issues with `yarn-install` action
6+
- remove `GCR_ACCOUNT_KEY` from envVar for `build-push-image` action
7+
- remove "Login to Google Artifact Registry - GAR" step from the same action and replace it with "Set up Docker login"

build-push-image/action.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: |
44
****
55
envInputs:
66
DOCKER_BUILDX_ENDPOINT: Docker buildx endpoint (Optional if using for GH runners)
7-
GCR_ACCOUNT_KEY: Necessary token to push image to Google cloud
87
GITHUB_TOKEN: GitHub token. Is used to checkout `davinci` branch
98
TOPTAL_BUILD_BOT_SSH_KEY: SSH key to access Google cloud
109
@@ -109,12 +108,11 @@ runs:
109108
with:
110109
ssh-private-key: ${{ env.TOPTAL_BUILD_BOT_SSH_KEY }}
111110

112-
- name: Login to Google Artifact Registry - GAR
113-
uses: docker/login-action@v3
114-
with:
115-
registry: ${{ steps.meta-build.outputs.REGISTRY_REGION }}
116-
username: _json_key
117-
password: ${{ env.GCR_ACCOUNT_KEY }}
111+
- name: Set up Docker login
112+
run: |
113+
gcloud --quiet auth configure-docker
114+
gcloud --quiet auth configure-docker us-central1-docker.pkg.dev,us-east1-docker.pkg.dev
115+
shell: bash
118116

119117
- name: Set up Docker Buildx - CI custom runners
120118
if: "contains(runner.name, 'inf-gha-runners') || contains(runner.name, 'ubuntu2204')"

yarn-install/action.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ runs:
101101
102102
echo "registry=https://us-central1-npm.pkg.dev/toptal-ci/npm-registry/" > ${{ inputs.path }}/.npmrc
103103
104-
echo "//us-central1-npm.pkg.dev/toptal-ci/npm-registry/:username=oauth2accesstoken" >> ${{ inputs.path }}/.npmrc
105-
echo "//us-central1-npm.pkg.dev/toptal-ci/npm-registry/:_password=${{ inputs.npm-gar-token }}" >> ${{ inputs.path }}/.npmrc
104+
echo "//us-central1-npm.pkg.dev/toptal-ci/npm-registry/:_authToken=${{ inputs.npm-gar-token }}" >> ${{ inputs.path }}/.npmrc
106105
107106
echo "@toptal:registry=https://registry.npmjs.org/" >> ${{ inputs.path }}/.npmrc &&
108107
echo "//registry.npmjs.org/:_authToken=${{ inputs.npm-token || env.NPM_TOKEN }}" >> ${{ inputs.path }}/.npmrc &&

0 commit comments

Comments
 (0)