You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
894 B
32 lines
894 B
--- |
|
name: Workflow Linter |
|
|
|
on: |
|
pull_request: |
|
paths: |
|
- .github/workflows/** |
|
workflow_call: |
|
|
|
jobs: |
|
lint: |
|
name: "Workflow Linter" |
|
runs-on: ubuntu-20.04 |
|
steps: |
|
|
|
- name: Checkout Branch |
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 |
|
with: |
|
fetch-depth: 0 |
|
|
|
- name: Get changed workflows |
|
id: changed-workflows |
|
run: | |
|
MODIFIED_WORKFLOWS=$(git diff --name-only origin/${{ github.base_ref }} | grep -E '.github/workflows/.*.yml' | tr '\n' ' ') |
|
echo "::set-output name=modified-workflows::$MODIFIED_WORKFLOWS" |
|
|
|
- name: Workflow Lint |
|
env: |
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
uses: bitwarden/gh-actions/lint-workflow@90380413e6428ae49f54858e6fa51df5b34868c9 |
|
with: |
|
workflows: ${{ steps.changed-workflows.outputs.modified-workflows }}
|
|
|