test v2024.6.4 #114
Workflow file for this run
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 yaml' | |
on: | |
pull_request_target: | |
workflow_dispatch: | |
jobs: | |
yamllint: | |
name: 'lint yamls' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'workaround for nektos/act' | |
run: | | |
if [ ! -f "/etc/lsb-release" ] ; then | |
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release | |
fi | |
- name: 'checkout' | |
uses: actions/checkout@v4 | |
- name: 'yamllint' | |
id: lint | |
uses: ibiqlik/[email protected] | |
with: | |
config_file: ci/yamllint.yml | |
continue-on-error: true | |
- name: 'comment on PR' | |
if: github.event_name == 'pull_request_target' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const commentContent = `yamllint: ${{ steps.lint.outcome }}`; | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: commentContent | |
}) | |
- name: 'fail if linting fails' | |
if: steps.lint.outcome == 'failure' | |
run: exit 1 |