From 1cb752a2a5876fc0496c179e09969455cab451da Mon Sep 17 00:00:00 2001 From: Raphael Flechtner <39338561+flechtnergalani@users.noreply.github.com> Date: Fri, 3 Jul 2020 14:44:36 +0200 Subject: [PATCH] fix: devnet build with latest sdk (#274) I was under the assumption that the setup node action creates a .npmrc & .yarnrc file in the working directory, but I was mistaken. To fix this, I added a .npmrc template to the repository, with which I overwrite the .npmrc in the workflow --- .github/workflows/aws-dev.yml | 10 +++------- .npmrc.github | 3 +++ Dockerfile.devnet | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 .npmrc.github diff --git a/.github/workflows/aws-dev.yml b/.github/workflows/aws-dev.yml index c7c405be..928bd5ff 100644 --- a/.github/workflows/aws-dev.yml +++ b/.github/workflows/aws-dev.yml @@ -40,6 +40,9 @@ jobs: - name: Checkout uses: actions/checkout@v1 + - name: set up .npmrc to point to github packages + run: mv -f .npmrc.github .npmrc + - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -51,13 +54,6 @@ jobs: id: login-ecr uses: aws-actions/amazon-ecr-login@v1 - - name: set up .npmrc & .yarnrc to connect to github packages - uses: actions/setup-node@v1 - with: - node-version: 10 - registry-url: https://npm.pkg.github.com - scope: '@kiltprotocol' - - name: Build, tag, and push image to Amazon ECR id: build-image env: diff --git a/.npmrc.github b/.npmrc.github new file mode 100644 index 00000000..4f5fecbe --- /dev/null +++ b/.npmrc.github @@ -0,0 +1,3 @@ +//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN} +@kiltprotocol:registry=https://npm.pkg.github.com +always-auth=true \ No newline at end of file diff --git a/Dockerfile.devnet b/Dockerfile.devnet index 8c20db39..f05c0ae1 100644 --- a/Dockerfile.devnet +++ b/Dockerfile.devnet @@ -5,7 +5,7 @@ ARG NODE_AUTH_TOKEN WORKDIR /app COPY package.json yarn.lock ./ -COPY .npmrc .yarnrc ./ +COPY .npmrc ./ RUN yarn upgrade --scope @kiltprotocol --latest COPY . ./