Set permissions explicitly (#35) #86
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: Linting | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: read | |
statuses: write | |
jobs: | |
yamllint: | |
runs-on: ubuntu-22.04 | |
name: Run yamllint | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Get yamllint config file from dotfiles | |
env: | |
# yamllint disable-line rule:line-length | |
CONFIG_FILE: https://raw.githubusercontent.com/bewuethr/dotfiles/master/.config/yamllint/config | |
run: curl "$CONFIG_FILE" > .github/workflows/yamllintconfig | |
- name: Run YAML linter | |
uses: bewuethr/yamllint-action@v1 | |
with: | |
config-file: .github/workflows/yamllintconfig | |
markdownlint: | |
runs-on: ubuntu-22.04 | |
name: Run markdownlint | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Get mdl style file from dotfiles | |
env: | |
# yamllint disable-line rule:line-length | |
STYLE_FILE: https://raw.githubusercontent.com/bewuethr/dotfiles/master/.config/mdl/style.rb | |
run: curl "$STYLE_FILE" > .github/workflows/style.rb | |
- name: Run Markdown linter | |
uses: bewuethr/mdl-action@v1 | |
with: | |
style-file: .github/workflows/style.rb | |
shellcheck: | |
runs-on: ubuntu-22.04 | |
name: Run ShellCheck | |
steps: | |
- name: Check out code | |
uses: actions/[email protected] | |
- name: Run ShellCheck | |
uses: bewuethr/shellcheck-action@v2 | |
lint: | |
name: Run super-linter job | |
uses: bewuethr/workflows/.github/workflows/linter.yml@main | |
permissions: | |
contents: read | |
packages: read | |
statuses: write | |
with: | |
validate-dockerfile: true |