Skip to content

Commit

Permalink
feat: 添加actionlint,验证workflows/*下的*.yml文件是否符合规范
Browse files Browse the repository at this point in the history
  • Loading branch information
ChinaGodMan committed Dec 23, 2024
1 parent 4231f86 commit f32e1f5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/actionlint.yml
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

0 comments on commit f32e1f5

Please sign in to comment.