Skip to content

Commit

Permalink
[#1307] Added linnting for GHAs.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed May 3, 2024
1 parent 29d3f9b commit 2cc90eb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/scaffold-test-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,18 @@ jobs:
directory: /tmp/.scaffold-coverage-html
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

scaffold-test-actions:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Check coding standards with yamllint
run: yamllint --config-file .scaffold/tests/.yamllint-for-gha.yml .github/workflows
continue-on-error: ${{ vars.DREVOPS_CI_YAMLLINT_IGNORE_FAILURE == '1' }}

- name: Check coding standards with actionlint
run: docker run --rm -v "${GITHUB_WORKSPACE:-.}":/app --workdir /app rhysd/actionlint:1.6.27
continue-on-error: ${{ vars.DREVOPS_CI_ACTIONLINT_IGNORE_FAILURE == '1' }}
17 changes: 17 additions & 0 deletions .scaffold/tests/.yamllint-for-gha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Yamllint configuration file used to check GitHub Actions configuration files.
extends: default

rules:
comments:
min-spaces-from-content: 1
document-start:
present: false
empty-lines:
max: 1
max-start: 0
max-end: 0
line-length:
max: 255
truthy:
allowed-values: ['true', 'false']
check-keys: false

1 comment on commit 2cc90eb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.