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

Add and sync actionlint workflow #198

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Add and sync actionlint workflow #198

merged 2 commits into from
Oct 31, 2024

Conversation

carlocab
Copy link
Member

This makes sure we run actionlint and zizmor across all our repos.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

@carlocab carlocab merged commit c4dc5ee into master Oct 31, 2024
32 checks passed
@carlocab carlocab deleted the actionlint branch October 31, 2024 10:22
@@ -0,0 +1,81 @@
# This file is synced from the `.github` repository, do not modify it directly.
name: Workflow Syntax
Copy link
Member

Choose a reason for hiding this comment

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

Can this have Actionlint in the name so it better matches the filename?

Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +103 to +104
brew
homebrew-core
Copy link
Member

Choose a reason for hiding this comment

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

What's custom in the actionlint workflow for these two?

Copy link
Member Author

Choose a reason for hiding this comment

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

They reuse the clones made by setup-homebrew (and homebrew-core has core: true there). The brew workflow also runs on changes to .github/actionlint.yaml (which is different from .github/workflows/actionlint.yml). homebrew-core has some handling for shell: /bin/bash.

test-bot: false

- name: Install tools
run: brew install actionlint shellcheck zizmor
Copy link
Member

Choose a reason for hiding this comment

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

Will actionlint call overlap with brew style or brew tap-syntax in any of those repos?

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably for brew style, not for brew tap-syntax. But running it inside brew style doesn't seem to work properly anyway -- we're getting new actionlint errors now. (Unless we weren't running brew style or brew tap-syntax where that happened, but I don't think that was the case.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I just double checked:

  • it won't overlap, because we skip actionlint for repos with an actionlint.yml workflow
  • the new errors are from the -ignore we pass in brew style, so the new errors are not evidence of brew style not working properly.

- name: Set up actionlint
run: echo "::add-matcher::$(brew --repository)/.github/actionlint-matcher.json"

- run: actionlint
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Pushed fixes to avoid the error instead of ignoring it -- adding -ignore isn't great since it means you can't run actionlint directly from the command-line.

@Bo98
Copy link
Member

Bo98 commented Oct 31, 2024

Actionlint can remain for private repos, but code scanning via zizmor won't work (unless we make it fail the job on errors instead) as code scanning is not even an base enterprise feature but one that requries "GitHub Advanced Security".

@MikeMcQuaid
Copy link
Member

@carlocab thanks for explaining!

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.

5 participants