-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error when trying to use the action in multiple steps #134
Comments
Problem When one wants to use hadolint-gh-action multiple times, an error is raised because the bin directory already exists, see jbergstroem#134 Solution Use option -p of mkdir
Interesting find! I guess we could just exit early if the binary already exists. I can make that change unless you're keen! |
Thanks for this fast answer ! Isn't #135 enough to fix this issue ? |
It would definitely fix the issue; just thinking skipping a download shave off some seconds. To be correct it'd have to take version change checks into consideration though. |
You're right, I'll update the PR to skip it if needed. Thanks for pointing that out ! |
When running the action twice in a job, it fails because the directory we tried to create already exists. Check if there already is a binary and that it is the version we expect. This also saves us a bit of time by avoiding a re-download. Finally, add e2e tests to cover all use-cases. PR: jbergstroem#135 Closes: jbergstroem#134 Co-Authored-By: Johan Bergström <[email protected]>
When running the action twice in a job, it fails because the directory we tried to create already exists. Check if there already is a binary and that it is the version we expect. This also saves us a bit of time by avoiding a re-download. Finally, add e2e tests to cover all use-cases. PR: jbergstroem#135 Closes: jbergstroem#134 Co-Authored-By: Johan Bergström <[email protected]>
When running the action twice in a job, it fails because the directory we tried to create already exists. Check if there already is a binary and that it is the version we expect. This also saves us a bit of time by avoiding a re-download. Finally, add e2e tests to cover all use-cases. PR: #135 Closes: #134 Co-Authored-By: Johan Bergström <[email protected]>
I'm currently using this wonderful action and I'm encountering a minor bug.
To design an action for a group of projects, I wanted to use hadolint-gh-action in two different steps where the first works on directory docker and the second on .devcontainer. However, if one wants to use the action twice, there is an issue because of
mkdir ${{ github.action_path }}/bin
in the action.yml file. Since it already exists, you end up with the following errormkdir: cannot create directory ‘/home/runner/work/_actions/jbergstroem/hadolint-gh-action/v1/bin’: File exists
.A quick fix would be to use option
-p
ofmkdir
to avoid throwing an error is the path exists.The text was updated successfully, but these errors were encountered: