We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could be related to the following issue but got resolved long time ago and was related to v2 specifically: #162
Steps to reproduce:
Should be able to build image
1.372 * Getting lib (https://github.com/<org-name>/libraryr) 1.542 fatal: could not read Username for 'https://github.com/': No such device or address 1.548 ** (Mix) Command "git --git-dir=.git fetch --force --quiet --progress" failed ------ Dockerfile:33 -------------------- 31 | # install mix dependencies 32 | COPY mix.exs mix.lock ./ 33 | >>> RUN mix deps.get --only $MIX_ENV 34 | RUN mkdir config 35 | -------------------- ERROR: failed to solve: process "/bin/sh -c mix deps.get --only $MIX_ENV" did not complete successfully: exit code: 1 Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c mix deps.get --only $MIX_ENV" did not complete successfully: exit code: 1
No response
name: Publish on: release: types: [ published, edited ] tags: - "v*.*.*" env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Generate a token id: generate_token uses: actions/create-github-app-token@v1 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PEM }} - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: "${{ steps.generate_token.outputs.token }}" - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Set Versions uses: actions/github-script@v4 id: set_version with: script: | const tag = context.ref.substring(10) const no_v = tag.replace('v', '') const dash_index = no_v.lastIndexOf('-') const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v core.setOutput('tag', tag) core.setOutput('no-v', no_v) core.setOutput('no-dash', no_dash) - name: Release to packages uses: docker/build-push-action@v5 with: context: . push: true secrets: | GIT_AUTH_TOKEN=${{ steps.generate_token.outputs.token }} tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{steps.set_version.outputs.no-dash}}
The text was updated successfully, but these errors were encountered:
GIT_AUTH_TOKEN is only used by BuildKit to clone Git sources and doesn't apply to RUN instructions directly for any git command invocations.
GIT_AUTH_TOKEN
RUN
git
You need to handle this yourself in the step RUN mix deps.get --only $MIX_ENV by using a secret mount and managing git configuration.
RUN mix deps.get --only $MIX_ENV
Something similar to:
RUN --mount=type=secret,id=GIT_AUTH_TOKEN \ set -e GIT_AUTH_TOKEN=$(cat /run/secrets/GIT_AUTH_TOKEN) if [ -n "$GIT_AUTH_TOKEN" ]; then echo "Setting GitHub access token" git config --global "url.https://x-access-token:${GIT_AUTH_TOKEN}@github.com.insteadof" "https://github.com" fi mix deps.get --only $MIX_ENV EOT
Would need to see your Dockerfile to make sure you don't do it with the final stage but dependent one to avoid exposing the secret in git config.
Sorry, something went wrong.
No branches or pull requests
Contributing guidelines
I've found a bug, and:
Description
Could be related to the following issue but got resolved long time ago and was related to v2 specifically: #162
Steps to reproduce:
Expected behaviour
Should be able to build image
Actual behaviour
Repository URL
No response
Workflow run URL
No response
YAML workflow
Workflow logs
No response
BuildKit logs
No response
Additional info
No response
The text was updated successfully, but these errors were encountered: