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
The GitHub Action is limited to a single input argument.
Currently, action.yml looks like this:
args: - appimage-builder - '--recipe=${{ inputs.recipe }}' - '${{ inputs.args }}'
inputs.args is not a list, but a single string. Thus it is not possible to use more than one argument. Example:
inputs.args
uses: AppImageCrafters/[email protected] with: recipe: dist/AppImageBuilder.yml args: --skip-tests --appdir "Custom AppDir"
This will run the appimage-builder container with 3 arguments:
appimage-builder
--recipe=dist/AppImageBuilder.yml
--skip-tests --appdir "Custom AppDir"
The container run fails because it the input args are merged into one big string:
/usr/bin/docker run [...] appimagecrafters/appimage-builder:1.1.0 "appimage-builder" "--recipe=dist/AppImageBuilder.yml" "--appdir \"CustomAppDir\" --skip-tests" usage: appimage-builder [-h] [-v] [--recipe RECIPE] [--build-dir BUILD_DIR] [--appdir APPDIR] [--log LOGLEVEL] [--skip-script] [--skip-build] [--skip-tests] [--skip-appimage] [--generate] appimage-builder: error: unrecognized arguments: "--skip-tests --appdir \"Custom AppDir\""
The image must be called using a JSON list instead (see docs):
runs: using: 'docker' image: docker://appimagecrafters/appimage-builder:1.1.0 args: [ "appimage-builder", "--recipe=dist/AppImageBuilder.yml", "--skip-tests", "--appdir", "Custom AppDir" ]
To do that, input.args must be split. There are several possibilities todo that.
input.args
docker/build-push-action uses newlines as separator. It would look like
docker/build-push-action
- build-args: | --skip-tests --appdir "Custom AppDir"
I don't know how to convert this to a JSON list, they use a library.
An alternative is to use the string representation of a JSON list. This would look like:
- build-args: '[ "--skip-tests", "--appdir", "Custom AppDir" ]'
This string can be converted to a JSON list using the fromJSON() function.
Once the arguments are in JSON list representation, the two args appimage-builder and --recipe=... have to be added to the head of the list.
--recipe=...
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Problem
The GitHub Action is limited to a single input argument.
Cause
Currently, action.yml looks like this:
inputs.args
is not a list, but a single string. Thus it is not possible to use more than one argument. Example:This will run the appimage-builder container with 3 arguments:
appimage-builder
--recipe=dist/AppImageBuilder.yml
--skip-tests --appdir "Custom AppDir"
The container run fails because it the input args are merged into one big string:
Possible Solutions
The image must be called using a JSON list instead (see docs):
To do that,
input.args
must be split. There are several possibilities todo that.Newline-separated list
docker/build-push-action
uses newlines as separator. It would look likeI don't know how to convert this to a JSON list, they use a library.
JSON list
An alternative is to use the string representation of a JSON list. This would look like:
This string can be converted to a JSON list using the fromJSON() function.
Once the arguments are in JSON list representation, the two args
appimage-builder
and--recipe=...
have to be added to the head of the list.The text was updated successfully, but these errors were encountered: