-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
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
Build Args do not work #14
Comments
@parkeradam did you ever find a workaround for this? |
@patrickserrano @parkeradam Sorry for the late response. I think the source of this issue is the spaces inside of the Ex: @patrickserrano could you please share your |
I dont think any of my custom args has spaces or does this include the soace etween the individual build args? |
Thanks for the response, @parkeradam! My previous comment is a bit misleading - I should have provided a different example. In any case: custom-args: --build-arg "APP_BUILD_RUNTIME=linux-arm" --build-arg "DOCKER_BUILD_RUNTIME=mcr.microsoft.com/dotnet/runtime:6.0.3-bullseye-slim-arm64v8" --build-arg "DOCKER_BUILD_SDK=mcr.microsoft.com/dotnet/sdk:6.0.201-bullseye-slim-arm64v8" In this case, I think the correct value for the custom-args: --build-arg=APP_BUILD_RUNTIME="linux-arm" --build-arg=DOCKER_BUILD_RUNTIME="mcr.microsoft.com/dotnet/runtime:6.0.3-bullseye-slim-arm64v8" --build-arg=DOCKER_BUILD_SDK="mcr.microsoft.com/dotnet/sdk:6.0.201-bullseye-slim-arm64v8" Note that I've added I'm not 100% sure about this, but from my tests it should work. Could you, @patrickserrano , please, update your pipeline and check this? |
If you want and when you have spare time, of course. No pressure. |
Apologies, just seen this! Will give this a try hopefully within the next couple of week, been busy! Will keep you uodated. Thanks for the help on this :) |
Btw, recently I published a new version of this action. |
I've tried with and without quotes on the build args and without quotes seemd to get me further but then failed to build the container, unsure if its actually picked up the dotnet build. |
Thanks, @parkeradam ! As far as I understood, now there is the following error: #12 ERROR: executor failed running [/bin/sh -c dotnet restore "DDNSUpdate/DDNSUpdate.csproj"]: exit code: 1 I think it's related to the build process itself, and not the action and/or arguments. Maybe you could share any logs from the inside of a build stage? Are you able to build this Image locally? |
@parkeradam do you need more help with this issue or can I mark it as resolved? |
@VaultVulp feel free to close, apologies for ghosting, had a lot on atm! I'll open up another issue if i have problems when i get around to retrying. Thanks for your help :) |
Hi @VaultVulp I have the following issue. In my dockerfile:
in my action yml:
I get the following output:
So its not getting passed in as i would expect. Any ideas? Just checking here as I think im code blind at the moment. Ive tried wrapping the values in quotes too same error. Nothing comes through. |
Ho, @mattvb91! Thanks for your question! Sadly, it's a bit tricky to solve this issue w/o testing. Do you mind sharing the complete configuration for my action? Btw, I have an example configuration with the |
Hi @VaultVulp I have the same problem that @mattvb91 describes. This is my config: name: Build container image
on:
push:
tags:
- '*'
jobs:
container-image-dev:
runs-on: ubuntu-latest
environment: development
steps:
- uses: actions/checkout@v4
- name: Build container image
uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: image-dev
extract-git-tag: true
additional-image-tags: latest
dockerfile: Containerfile
build-context: .
custom-args: --build-arg=SOME_URL="${{ vars.DEV_SOME_URL }}" --build-arg=OTHER_URL="${{ vars.DEV_OTHER_URL }}"
container-image-prod:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: Build container image
uses: VaultVulp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
image-name: image-prod
extract-git-tag: true
additional-image-tags: latest
dockerfile: Containerfile
build-context: .
custom-args: --build-arg=SOME_URL="${{ vars.PROD_SMOME_URL }}" --build-arg=OTHER_URL="${{ vars.PROD_OTHER_URL }}" which shows this in the job output:
|
@categulario Thanks for your attention to my project. From my first impression it seems like your config should work and I'm not sure why action behaves in such way. I'll replicate your config and get back to you. |
@categulario sorry for the very late response. I've done some research on this issue. It seems smth was altered on the GitHub's side and it changed the way docker-based actions are executed. Configuration: https://github.com/VaultVulp/test-gp-docker-action/actions/runs/8980317812/workflow#L86
Could you, please, try to run this |
At the moment I had an urgent need to have images with arguments built using actions so I moved to I'll report back here if I manage to test the new version |
I am trying to pass build args to this action and it does not seem to want to work. I have tried with quotes, without quotes, nothing I try seems to be working.
Build here shows using linx-x86: https://github.com/parkeradam/DDNSUpdate/runs/5602781210?check_suite_focus=true
Action file has build arg specified as linux-arm : https://github.com/parkeradam/DDNSUpdate/blob/4683dbd1d51be6ec0c41cd98a5c421ba3be29044/.github/workflows/arm-build.yml
Am i missing something?
Thanks in advance.
The text was updated successfully, but these errors were encountered: