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 Actionlint warnings #838

Merged
merged 3 commits into from
Nov 28, 2024
Merged

Fix Actionlint warnings #838

merged 3 commits into from
Nov 28, 2024

Conversation

JackPGreen
Copy link
Collaborator

@JackPGreen JackPGreen commented Nov 27, 2024

Actionlint flagged warnings in our GitHub Actions:

  • .github/workflows/tag_image_push_rhel.yml:139:760: property "variant" is not defined in object type {jdk: any} [expression]
    • The property is empty so implicitly evaluates to empty string, i.e. builds only "base" variant (not slim)
    • This is the behaviour we actually want, so made explicit

[Actionlint](https://github.com/rhysd/actionlint) flagged warnings in our GitHub Actions:
- `.github/workflows/tag_image_push_rhel.yml:139:760: property "variant" is not defined in object type {jdk: any} [expression]`
   - The property is empty so implicitly evaluates to empty string, i.e. builds only "base" variant (not `slim`)
   - This is the behaviour we actually want, so made explicit
- `.github/workflows/tag_image_push.yml:56:18: input "RELEASE_TYPE" of workflow_call event has the default value "EE", but it is also required. if an input is marked as required, its default value will never be used [events]`
   - Pointless, removed
@JackPGreen JackPGreen self-assigned this Nov 27, 2024
@JackPGreen JackPGreen requested a review from a team as a code owner November 27, 2024 22:23
Copy link
Contributor

@nishaatr nishaatr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Out of interest, when/where do we run Actionlint?

@JackPGreen
Copy link
Collaborator Author

LGTM Out of interest, when/where do we run Actionlint?

We don't.

In hz-docs we introduced a broken workflow. I thought if the GitHub UI could flag this, why couldn't we catch this before it was merged via a GitHub Action linter or similar? So I tried a couple out to see if they'd help.
ActionLint is good but it flags shellcheck warnings too - which is great, but we have lots - so difficult to introduce into an existing project.
Ultimately I didn't progress the idea any further.

@JackPGreen JackPGreen enabled auto-merge (squash) November 28, 2024 10:16
@JackPGreen JackPGreen merged commit 0768ab3 into master Nov 28, 2024
14 checks passed
@JackPGreen JackPGreen deleted the fix-actionlint-warnings branch November 28, 2024 12:09
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.

3 participants