mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
workflows: add actionlint workflow
Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
parent
80372686fa
commit
7b85950e7a
17
.github/actionlint-matcher.json
vendored
Normal file
17
.github/actionlint-matcher.json
vendored
Normal file
@ -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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
8
.github/actionlint.yaml
vendored
Normal file
8
.github/actionlint.yaml
vendored
Normal file
@ -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: []
|
47
.github/workflows/actionlint.yml
vendored
Normal file
47
.github/workflows/actionlint.yml
vendored
Normal file
@ -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
|
||||||
|
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
|
||||||
|
(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
|
Loading…
x
Reference in New Issue
Block a user