-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 添加
actionlint
,验证workflows/*
下的*.yml
文件是否符合规范
- Loading branch information
1 parent
4231f86
commit f32e1f5
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copied from https://github.com/rhysd/actionlint/blob/048c97d90b98b832450d3adf00fc7757b0ed9953/docs/usage.md#use-actionlint-on-github-actions | ||
name: actionlint | ||
|
||
on: | ||
push: | ||
paths: | ||
- .github/workflows/*.yml | ||
pull_request: | ||
paths: | ||
- .github/workflows/*.yml | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false # Disable git write access | ||
- name: Download actionlint | ||
id: get_actionlint | ||
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
shell: bash | ||
- name: Check workflow files | ||
run: ${{ steps.get_actionlint.outputs.executable }} -color | ||
shell: bash |