Skip to content

TEMP/check permissions #3

TEMP/check permissions

TEMP/check permissions #3

name: Yamllint
on:
workflow_call:
inputs:
strict:
description: 'Whether to enable strict mode for yamllint.'
type: boolean
required: false
default: false
jobs:
yamllint:
name: 'Lint Yaml'
runs-on: ubuntu-latest
steps:
runs-on: ubuntu-latest
- name: Check what permission are needed

Check failure on line 19 in .github/workflows/reusable-yamllint.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/reusable-yamllint.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_MONITOR_CONFIG }}
- name: Checkout code
uses: actions/checkout@v5
- name: Check for existence of a Yamllint config file
id: has_config
uses: andstor/file-existence-action@v3
with:
files: ".yamllint.y*ml"
- name: Run Yamllint on all yaml files in repo
if: ${{ steps.has_config.outputs.files_exists == 'true' }}
run: yamllint . --format colored ${{ inputs.strict && '--strict' || '' }}
- name: Pipe Yamllint results on to GH for inline display
if: ${{ failure() && github.event_name == 'pull_request' }}
run: yamllint . --format github ${{ inputs.strict && '--strict' || '' }}
actionlint:
name: 'Check GHA workflows'
runs-on: ubuntu-latest
steps:
- name: Check what permission are needed
uses: GitHubSecurityLab/actions-permissions/monitor@v1
with:
config: ${{ vars.PERMISSIONS_MONITOR_CONFIG }}
- name: Checkout code
uses: actions/checkout@v5
- name: Add problem matcher
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
curl -o actionlint-matcher.json https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json
echo "::add-matcher::actionlint-matcher.json"
- name: Check workflow files
uses: docker://rhysd/actionlint:latest
with:
args: -color