-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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 #15210
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "actionlint", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
self-hosted-runner: | ||
# Labels of self-hosted runner in array of strings. | ||
labels: | ||
- 11-arm64 | ||
# Configuration variables in array of strings defined in your repository or | ||
# organization. `null` means disabling configuration variables check. | ||
# Empty array means no configuration variable is allowed. | ||
config-variables: [] |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,47 @@ | ||||
name: actionlint | ||||
|
||||
on: | ||||
push: | ||||
branches: | ||||
- master | ||||
paths: | ||||
- '.github/workflows/*.ya?ml' | ||||
pull_request: | ||||
paths: | ||||
- '.github/workflows/*.ya?ml' | ||||
merge_group: | ||||
|
||||
env: | ||||
HOMEBREW_DEVELOPER: 1 | ||||
carlocab marked this conversation as resolved.
Show resolved
Hide resolved
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||||
HOMEBREW_NO_ENV_HINTS: 1 | ||||
|
||||
concurrency: | ||||
group: "actionlint-${{ github.ref }}" | ||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||||
|
||||
jobs: | ||||
workflow_syntax: | ||||
if: github.repository_owner == 'Homebrew' | ||||
runs-on: ubuntu-22.04 | ||||
steps: | ||||
- name: Set up Homebrew | ||||
id: setup-homebrew | ||||
uses: Homebrew/actions/setup-homebrew@master | ||||
with: | ||||
test-bot: false | ||||
|
||||
- name: Set up actionlint | ||||
env: | ||||
HOMEBREW_REPOSITORY: ${{ steps.setup-homebrew.outputs.repository-path }} | ||||
run: | | ||||
brew install actionlint shellcheck | ||||
|
||||
# Annotations work only relative to GITHUB_WORKSPACE | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Annotations should work fine (see: test-bot in Homebrew/core). Are you referring to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Both. Annotations work for us otherwise because we use
I couldn't get this to show annotations without moving everything into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok looks like this actions/runner#765. |
||||
(shopt -s dotglob; rm -rf "${GITHUB_WORKSPACE:?}"/*; mv "${HOMEBREW_REPOSITORY:?}"/* "$GITHUB_WORKSPACE") | ||||
rmdir "$HOMEBREW_REPOSITORY" | ||||
ln -vs "$GITHUB_WORKSPACE" "$HOMEBREW_REPOSITORY" | ||||
|
||||
echo "::add-matcher::.github/actionlint-matcher.json" | ||||
|
||||
- run: actionlint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume it just doesn't complain about the others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, it doesn't know what to do with a dynamically generated runner label so just ignores it.