Skip to content
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

fix: don't download hadolint twice #135

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

SMoraisAnsys
Copy link
Contributor

Problem
When one wants to use hadolint-gh-action multiple times, an error is raised because the bin directory already exists, see #134

Solution
Use option -p of mkdir

Fixes #134

@SMoraisAnsys SMoraisAnsys marked this pull request as draft January 24, 2024 15:26
@jbergstroem
Copy link
Owner

Thanks a lot for the effort. Almost there!

@SMoraisAnsys SMoraisAnsys marked this pull request as ready for review January 25, 2024 16:29
@SMoraisAnsys
Copy link
Contributor Author

Hi @jbergstroem, is there a chance that this PR gets accepted next week with a following new release ? If there is something that is missing, feel free to point it out :)

@jbergstroem
Copy link
Owner

Hi @jbergstroem, is there a chance that this PR gets accepted next week with a following new release ? If there is something that is missing, feel free to point it out :)

Was AFK this weekend but yeah it'll land in 24h

@jbergstroem jbergstroem changed the title fix: no error if bin directory exists fix: don't download hadolint twice Jan 29, 2024
@SMoraisAnsys
Copy link
Contributor Author

Hi @jbergstroem, sorry to be so insistent but I'd really like to be able to use these developments through your action. Would it be possible to have a release this week?

@jbergstroem
Copy link
Owner

Hi @jbergstroem, sorry to be so insistent but I'd really like to be able to use these developments through your action. Would it be possible to have a release this week?

Apologise for the delay; took the opportunity to refactor the install into its own shell script. I'm almost done.

@jbergstroem
Copy link
Owner

@SMoraisAnsys ok, I think we're in good shape. How does it look for you?

jbergstroem added a commit to SMoraisAnsys/hadolint-gh-action that referenced this pull request Feb 2, 2024
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]>
@SMoraisAnsys
Copy link
Contributor Author

Yeah, everything look fine. Thanks for your help and great job with the refactoring !

@jbergstroem jbergstroem merged commit 2fc1e19 into jbergstroem:main Feb 2, 2024
9 of 10 checks passed
SMoraisAnsys added a commit to ansys/actions that referenced this pull request Feb 2, 2024
Note: this is now possible since
jbergstroem/hadolint-gh-action#135
got merged and released.
SMoraisAnsys added a commit to ansys/actions that referenced this pull request Feb 9, 2024
Note: this is now possible since
jbergstroem/hadolint-gh-action#135
got merged and released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when trying to use the action in multiple steps
2 participants