ansible-lint
ansible-lint copied to clipboard
GitHub Action: avoid extra working directory prefix for wget
The whole shell step for wget is run with the working directory for the action; hence, drop the extra prefix to the --output-document parameter of the wget command.
we fixed this in system roles by using an absolute path for the working directory (for ansible-lint and ansible-test also) - https://github.com/linux-system-roles/kernel_settings/pull/206
@bkaraoren I think you misunderstand what this PR does: the shell run block used to invoke wget already has the working_directory parameter set, so using it again in the output filename of wget is not correct.
What you describe sounds like a problem in the detection of the default working directory in case the working_directory parameter of this action is not specified (see the first set of the action, currently labelled "Process inputs"). In that case, I think that automatic detection ought to be fixed.
tection ought to be fixe
@ptoscano yep, that sounds also good. without providing any directory such as ${{ steps.inputs.outputs.working_directory }} I also expect it to work but former commit needs to be checked why it has been reverted back from not using any working directory in the commit #3938. Could be useful to check it to understand the reason what was the reason to include.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
We're going in circles here; this PR brings us back to the same state as before #4103.
For myself and others using a GitHub action in a repository subdirectory, #4103 addressed a major issue (see #3938, now #4323). However, it also introduced problems for other users.
In response, #4213 was merged, but this caused the action to become unusable again without resorting to hacky workarounds for the same use case.
Instead of continuing in this cycle, we should take a step back and reevaluate the approach, as each "fix" solves one group's problem but introduces a new breaking bug for another.
@tigattack @bkaraoren @ptoscano Please check https://github.com/ansible/ansible-lint/pull/4340 which will fix this issue while also adding regression tests. Once merged this PR will be closed. I will release it later today, hopefully addressing these long standing issues.
This change looks great and makes me much more confident, however it appears to have caused an issue with the Python deps install for me - See here.
Not intending to "bump", as I did already comment on the PR, just felt FYI-worthy for anyone tracking the issue.
Edit: Solved by #4342.