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

workflows: add actionlint workflow #128075

Merged
merged 1 commit into from
Apr 12, 2023
Merged

Conversation

carlocab
Copy link
Member

This will help automate avoiding actionlint errors in our workflow files.

  • workflow: add actionlint workflow
  • Add linter error for testing WIP

@carlocab carlocab requested review from a team and MikeMcQuaid as code owners April 11, 2023 15:12
@github-actions github-actions bot added the automerge-skip `brew pr-automerge` will skip this pull request label Apr 11, 2023
@carlocab carlocab marked this pull request as draft April 11, 2023 15:12
@carlocab
Copy link
Member Author

Error: Unable to process command '::add-matcher::.github/actionlint-matcher.json' successfully.
Error: Could not find a part of the path '/home/runner/work/homebrew-core/homebrew-core/.github/actionlint-matcher.json'.

🤔 but the file is here in my PR? Hm.

@carlocab carlocab force-pushed the actionlint branch 17 times, most recently from 08b38e1 to d752426 Compare April 11, 2023 18:07
@carlocab
Copy link
Member Author

carlocab commented Apr 11, 2023

Ok, getting annotations to show up properly requires a hack that we already use in our setup-homebrew action (but oddly do not do for homebrew-core).

@carlocab carlocab marked this pull request as ready for review April 11, 2023 18:09
Comment on lines 7 to 13
paths:
- '.github/workflows/*.yml'
- '.github/workflows/*.yaml'
pull_request:
paths:
- '.github/workflows/*.yml'
- '.github/workflows/*.yaml'
Copy link
Member

Choose a reason for hiding this comment

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

I think this might mean if you open a PR on a non-fork branch this will run twice? No big deal but perhaps worth a post-merge test.

Copy link
Member Author

Choose a reason for hiding this comment

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

I’d like to keep this JSON file only in one place. I think that should be doable once Homebrew/brew#15210 is merged.

@carlocab carlocab marked this pull request as draft April 12, 2023 12:48
@carlocab carlocab force-pushed the actionlint branch 5 times, most recently from 6773977 to eca911d Compare April 12, 2023 13:31
This will help automate avoiding actionlint errors in our workflow
files.
@carlocab carlocab marked this pull request as ready for review April 12, 2023 14:28
@carlocab carlocab added this pull request to the merge queue Apr 12, 2023
Merged via the queue into Homebrew:master with commit 8473b03 Apr 12, 2023
10 checks passed
@carlocab carlocab deleted the actionlint branch April 12, 2023 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants