-
Notifications
You must be signed in to change notification settings - Fork 39
Bad context on version 6.x.x #301
Copy link
Copy link
Closed
Description
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug, and:
- The documentation does not mention anything about my problem
- There are no open or closed issues that are related to my problem
Description
I have GH action where I update the .npmrc file to include authentication, this file is existing prior to me updating it and it contains placeholder info.
Example:
original . npmrc
foo:=_authToken=
updated . npmrc in step prior to build
foo:=_authToken=123
When I run build with . as a context, and use COPY . . the contents of the .npmrc within a build is original file as opposed to updated one.
Since I have used @master Ive tried with @v6.3.0 and @v5.13.0, it fails on 6 and passes with 5 version.
Expected behaviour
.npmrc contents are:
foo:=_authToken=123
Actual behaviour
.npmrc contents are:
foo:=_authToken=
Repository URL
No response
Workflow run URL
No response
YAML workflow
...
- name: Update npmrc
run: echo '//npm.pkg.github.com:_authToken=${{ secrets.GHRC_REPO_TOKEN }}' > .npmrc
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHRC_REPO_TOKEN }}
- name: Build and push
env:
IMAGE: ${{ env.IMAGE_NAME }}
REPO: ${{ github.repository }}
TAG: ${{ needs.opts.outputs.tag }}
META_TAG: ${{ needs.opts.outputs.metaTag }}
uses: docker/bake-action@v6.3.0
with:
targets: default
push: false
...Workflow logs
No response
BuildKit logs
Additional info
FROM node:18.20.4-alpine As builder
WORKDIR /app
COPY . .
# added to debug the issue
RUN cat .npmrc
RUN npm ci
RUN npm run build
RUN rm .npmrc
EXPOSE 3000
CMD [ "npm", "start" ]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels