Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adding yamllint github workflow #9

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/labels.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/label-synchronization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-delete: false
yaml-file: .github/labels.yaml

Check failure on line 30 in .github/workflows/label-synchronization.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

30:3 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 30 in .github/workflows/label-synchronization.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

30:1 [trailing-spaces] trailing spaces

Check failure on line 30 in .github/workflows/label-synchronization.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

30:3 [new-line-at-end-of-file] no new line character at the end of file

Check failure on line 30 in .github/workflows/label-synchronization.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

30:1 [trailing-spaces] trailing spaces
15 changes: 15 additions & 0 deletions .github/workflows/label-test-reusable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "label-sync"

on:
push:
branches:
- '**'

permissions:
# write permission is required to edit issue labels
issues: write

jobs:
labelsync:
uses: schubergphilis/mcaf-github-workflows/.github/workflows/label-synchronization.yaml@feature/yamllint_workflow
22 changes: 22 additions & 0 deletions .github/workflows/pr-yamllint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: "pr-yamllint"

on:
pull_request:
types:
- opened
- synchronize

Check failure on line 9 in .github/workflows/pr-yamllint.yml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

9:1 [trailing-spaces] trailing spaces

Check failure on line 9 in .github/workflows/pr-yamllint.yml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

9:1 [trailing-spaces] trailing spaces

Check failure on line 10 in .github/workflows/pr-yamllint.yml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

10:1 [trailing-spaces] trailing spaces

Check failure on line 10 in .github/workflows/pr-yamllint.yml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

10:1 [trailing-spaces] trailing spaces
push:
branches:
- '**'

#permissions:

Check warning on line 15 in .github/workflows/pr-yamllint.yml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

15:2 [comments] missing starting space in comment

Check warning on line 15 in .github/workflows/pr-yamllint.yml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

15:2 [comments] missing starting space in comment
# contents: read
# issues: write
# pull-requests: write

jobs:
yamllint:
uses: schubergphilis/mcaf-github-workflows/.github/workflows/pr-yamllint.yml@feature/yamllint_workflow
6 changes: 3 additions & 3 deletions .github/workflows/terraform-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

on:
pull_request:

Check failure on line 5 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

5:1 [trailing-spaces] trailing spaces

Check failure on line 5 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

5:1 [trailing-spaces] trailing spaces
permissions:
contents: write
pull-requests: write

Check failure on line 9 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

9:1 [trailing-spaces] trailing spaces

Check failure on line 9 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

9:1 [trailing-spaces] trailing spaces
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TF_IN_AUTOMATION: 1

Check failure on line 13 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

13:1 [trailing-spaces] trailing spaces

Check failure on line 13 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

13:1 [trailing-spaces] trailing spaces
jobs:
fmt-lint-validate:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -122,7 +122,7 @@
output-file: README.md
output-method: inject
working-dir: .
continue-on-error: true # added this to prevent a PR from a remote fork failing the workflow

Check warning on line 125 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

125:33 [comments] too few spaces before comment

Check warning on line 125 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

125:33 [comments] too few spaces before comment

tfsec:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -166,5 +166,5 @@
# Check | Description | Reason

# CKV_GIT_5 | Ensure GitHub pull requests have at least 2 approvals | We strive for at least 1 approval
# CKV_GLB_1 | Ensure at least two approving reviews are required to merge a GitLab MR | We strive for at least 1 approval

Check warning on line 169 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

169:121 [line-length] line too long (121 > 120 characters)

Check warning on line 169 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

169:121 [line-length] line too long (121 > 120 characters)
# CKV_TF_1 | Ensure Terraform module sources use a commit hash | We think this check is too restrictive and that versioning should be preferred over commit hash

Check warning on line 170 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

170:121 [line-length] line too long (160 > 120 characters)

Check warning on line 170 in .github/workflows/terraform-validation.yaml

View workflow job for this annotation

GitHub Actions / yamllint / Lint YAML files

170:121 [line-length] line too long (160 > 120 characters)
Loading