set build and lint concurrency #22
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
--- | |
name: Lint Files | |
# Events: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows | |
on: | |
# Run workflow on push except for ignored branches and paths | |
push: | |
branches-ignore: | |
- 'cherry-pick-*' | |
paths-ignore: | |
- '**.md' # Ignore documentation change | |
# Run workflow on pull request | |
pull_request: # By default, a workflow only runs when a pull_request event's activity type is opened, synchronize, or reopened | |
# Allow other Workflows to call this Workflow | |
workflow_call: | |
# Run a single job at a time: https://docs.github.com/en/actions/using-jobs/using-concurrency | |
concurrency: | |
group: lint-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest # GitHub-hosted runners: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout | |
- name: YAML Lint | |
run: yamllint . # yamllint is pre-installed: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#tools |