Skip to content

Commit 7c732b2

Browse files
fix: fixed yml files as per the yml-lint rules (#71)
Co-authored-by: Vishwajit Nagulkar <[email protected]>
1 parent d2054e8 commit 7c732b2

File tree

14 files changed

+290
-289
lines changed

14 files changed

+290
-289
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1+
---
12
version: 2
23
updates:
34
- package-ecosystem: 'github-actions'
45
# Workflow files stored in the
56
# default location of `.github/workflows`
6-
directory: '/' # Location of package manifests
7+
directory: '/' # Location of package manifests
78
schedule:
89
interval: 'weekly'
910
day: 'sunday'
1011
time: '09:00'
1112
timezone: 'America/Toronto'
1213
open-pull-requests-limit: 3
1314
assignees:
14-
- "clouddrove-ci"
15+
- "clouddrove-ci"
1516
reviewers:
16-
- "d4kverma"
17-
- "anmolnagpal"
17+
- "d4kverma"
18+
- "anmolnagpal"
1819
- package-ecosystem: 'terraform'
19-
directory: '*' # Location of package manifests
20+
directory: '*' # Location of package manifests
2021
schedule:
2122
interval: 'weekly'
2223
day: 'sunday'
2324
time: '09:00'
2425
timezone: 'America/Toronto'
2526
open-pull-requests-limit: 3
2627
assignees:
27-
- "clouddrove-ci"
28+
- "clouddrove-ci"
2829
reviewers:
29-
- "d4kverma"
30-
- "anmolnagpal"
30+
- "d4kverma"
31+
- "anmolnagpal"
32+
...
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1+
---
12
name: Assignees
23

34
on:
45
workflow_call:
56
inputs:
6-
assignees:
7-
description: 'A list of assignees(GitHub user name) to be added to PR'
8-
required: true
9-
type: string
10-
7+
assignees:
8+
description: 'A list of assignees(GitHub user name) to be added to PR'
9+
required: true
10+
type: string
1111
secrets:
12-
GITHUB:
13-
description: 'Your GitHub token for authentication.'
14-
required: true
12+
GITHUB:
13+
description: 'Your GitHub token for authentication.'
14+
required: true
1515

1616
jobs:
1717
assign:
@@ -20,4 +20,5 @@ jobs:
2020
- uses: wow-actions/auto-assign@v3
2121
with:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB }}
23-
assignees: ${{ inputs.assignees }}
23+
assignees: ${{ inputs.assignees }}
24+
...

.github/workflows/changelog.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: CHANGELOG
23

34
on:
@@ -9,7 +10,7 @@ on:
910
secrets:
1011
GITHUB:
1112
required: true
12-
description: 'PAT of the user to run the jobs.'
13+
description: 'PAT of the user to run the jobs.'
1314

1415
jobs:
1516
create_changelog:
@@ -45,8 +46,9 @@ jobs:
4546
uses: stefanzweifel/git-auto-commit-action@v4
4647
with:
4748
branch: ${{ inputs.branch}}
48-
commit_user_name: clouddrove-ci # defaults to "github-actions[bot]"
49-
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
49+
commit_user_name: clouddrove-ci # defaults to "github-actions[bot]"
50+
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
5051
commit_author: CloudDrove CI <[email protected]>
5152
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }}'
5253
file_pattern: CHANGELOG.md
54+
...

.github/workflows/checkov.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1+
---
12
name: checkov
23
# Controls when the workflow will run
34
on:
4-
# Triggers the workflow on worflow call request events.
5+
# Triggers the workflow on worflow call request events.
56
workflow_call:
67
inputs:
7-
directory:
8+
directory:
89
required: true
910
type: string
10-
continue_on_error:
11+
continue_on_error:
1112
required: true
1213
type: string
1314
default: 'true'
14-
var_file:
15+
var_file:
1516
required: false
1617
type: string
17-
18+
1819
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1920
jobs:
2021
# This workflow contains a single job called "scan"
2122
scan:
2223
permissions:
23-
contents: read # for actions/checkout to fetch code
24-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
25-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
26-
24+
contents: read # for actions/checkout to fetch code
25+
security-events: write # - for github/codeql-action/upload-sarif to upload SARIF results
26+
actions: read # - only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
27+
2728
# The type of runner that the job will run on
2829
runs-on: ubuntu-latest
2930

3031
# Steps represent a sequence of tasks that will be executed as part of the job
3132
steps:
3233
# Checks-out your repository under $GITHUB_WORKSPACE, so follow-up steps can access it
3334
- uses: actions/checkout@v3
34-
35+
3536
- name: Checkov GitHub Action
3637
if: ${{ inputs.continue_on_error == 'true' }}
3738
uses: bridgecrewio/checkov-action@v12
@@ -42,7 +43,7 @@ jobs:
4243
soft_fail: true
4344
directory: ${{ inputs.directory}}
4445
var_file: ${{ inputs.var_file}}
45-
46+
4647
- name: Checkov GitHub Action
4748
if: ${{ inputs.continue_on_error == 'false' }}
4849
uses: bridgecrewio/checkov-action@v12
@@ -52,15 +53,15 @@ jobs:
5253
output_file_path: console,results.sarif
5354
directory: ${{ inputs.directory}}
5455
var_file: ${{ inputs.var_file}}
55-
56-
56+
5757
- name: Upload SARIF file
5858
uses: github/codeql-action/upload-sarif@v2
5959
# Results are generated only on a success or failure
60-
# this is required since GitHub by default won't run the next step
61-
# when the previous one has failed. Security checks that do not pass will 'fail'.
60+
# This is required since GitHub by default won't run the next step
61+
# when the previous one has failed. Security checks that do not pass will 'fail'
6262
# An alternative is to add `continue-on-error: true` to the previous step
63-
# Or 'soft_fail: true' to checkov.
63+
# Or 'soft_fail: true' to checkov
6464
if: success() || failure()
6565
with:
6666
sarif_file: results.sarif
67+
...

.github/workflows/docker-scanner.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: docker-scanner
23

34
on:
@@ -28,19 +29,19 @@ jobs:
2829
uses: docker/build-push-action@v4
2930
with:
3031
push: false
31-
load: true # Export to Docker Engine rather than pushing to a registry
32+
load: true # Export to Docker Engine rather than pushing to a registry
3233
tags: ${{ github.sha }}
3334
platforms: linux/amd64
34-
35+
3536
- name: Docker Scan with trivy (non-blocking)
3637
uses: aquasecurity/trivy-action@master
3738
env:
3839
tags: ${{ github.sha }}
3940
with:
40-
image-ref: ${{ github.sha }}
41-
exit-code: 0
42-
format: 'sarif'
43-
output: 'trivy-results.sarif'
41+
image-ref: ${{ github.sha }}
42+
exit-code: 0
43+
format: 'sarif'
44+
output: 'trivy-results.sarif'
4445

4546
- name: Upload Trivy scan results to GitHub Security tab
4647
uses: github/codeql-action/upload-sarif@v2
@@ -50,8 +51,8 @@ jobs:
5051
- name: Docker Scan with trivy (blocking)
5152
uses: aquasecurity/trivy-action@master
5253
with:
53-
image-ref: ${{ github.sha }}
54-
format: table
55-
exit-code: 1
56-
# severity: 'HIGH,CRITICAL'
57-
severity: ${{ inputs.severity}}
54+
image-ref: ${{ github.sha }}
55+
format: table
56+
exit-code: 1
57+
severity: ${{ inputs.severity}}
58+
...

.github/workflows/docker.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: docker-build-push
23

34
on:
@@ -18,7 +19,6 @@ on:
1819
IMAGE_TAG:
1920
required: true
2021
type: string
21-
2222
secrets:
2323
AWS_ACCESS_KEY_ID:
2424
description: 'aws access keys'
@@ -53,7 +53,7 @@ jobs:
5353
if: ${{ inputs.registry == 'DOCKERHUB' }}
5454
env:
5555
IMAGE_TAG: ${{ inputs.IMAGE_TAG }}
56-
images: ${{ inputs.images }}
56+
images: ${{ inputs.images }}
5757
run: |
5858
docker build -t $images:$IMAGE_TAG .
5959
docker push $images:$IMAGE_TAG
@@ -75,7 +75,6 @@ jobs:
7575
env:
7676
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
7777
ECR_REPOSITORY: ${{ inputs.ECR_REPOSITORY }}
78-
# IMAGE_TAG: ${{ github.run_number }}
7978
IMAGE_TAG: ${{ inputs.IMAGE_TAG }}
8079
run: |
8180
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
@@ -93,7 +92,6 @@ jobs:
9392
run: |
9493
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
9594
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
96-
9795
docker build -t $images:$IMAGE_TAG .
9896
docker push $images:$IMAGE_TAG
99-
97+
...

.github/workflows/readme.yml

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,46 @@
1-
name: 'Create README.md file'
1+
---
2+
name: Create README.md file
23
on:
3-
workflow_call:
4-
4+
workflow_call: null
55
jobs:
66
readme-create:
7-
name: 'readme-create'
7+
name: readme-create
88
runs-on: ubuntu-latest
99
steps:
10-
- name: 'Checkout'
10+
- name: Checkout
1111
uses: actions/checkout@master
12-
13-
- name: 'Set up Python 3.7'
12+
- name: Set up Python 3.7
1413
uses: actions/setup-python@v4
1514
with:
16-
python-version: '3.x'
17-
18-
- name: 'create readme'
19-
uses: 'clouddrove/[email protected]'
15+
python-version: 3.x
16+
- name: create readme
17+
uses: clouddrove/[email protected]
2018
with:
21-
actions_subcommand: 'readme'
22-
github_token: '${{ secrets.GITHUB }}'
19+
actions_subcommand: readme
20+
github_token: ${{ secrets.GITHUB }}
2321
env:
2422
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
26-
27-
- name: 'pre-commit check errors'
23+
- name: pre-commit check errors
2824
uses: pre-commit/[email protected]
2925
continue-on-error: true
30-
31-
- name: 'pre-commit fix erros'
26+
- name: pre-commit fix erros
3227
uses: pre-commit/[email protected]
3328
continue-on-error: true
34-
35-
- name: 'push readme'
36-
uses: 'clouddrove/[email protected]'
29+
- name: push readme
30+
uses: clouddrove/[email protected]
3731
continue-on-error: true
3832
with:
39-
actions_subcommand: 'push'
33+
actions_subcommand: push
4034
env:
4135
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42-
43-
- name: 'Slack Notification'
36+
- name: Slack Notification
4437
uses: clouddrove/action-slack@v2
4538
with:
4639
status: ${{ job.status }}
4740
fields: repo,author
48-
author_name: 'CloudDrove'
41+
author_name: CloudDrove
4942
env:
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # required
51-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }} # required
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_TERRAFORM }}
5245
if: always()
46+
...

.github/workflows/sst_workflow.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Shared Workflow - SST Deploy
23

34
on:
@@ -23,15 +24,15 @@ on:
2324
default: ""
2425
type: string
2526
yarn-cache:
26-
description: 'Cache required or not for yarn install'
27+
description: 'Cache required or not for yarn install'
2728
type: string
2829
default: false
2930
deploy:
30-
description: 'Default deploy otherwise run diff command to detect changes in stacks'
31+
description: 'Default deploy otherwise run diff command to detect changes in stacks'
3132
type: string
3233
default: true
3334
self-hosted:
34-
description: 'Deploy stack with github self hosted runner or not'
35+
description: 'Deploy stack with github self hosted runner or not'
3536
type: string
3637
default: true
3738

@@ -108,10 +109,10 @@ jobs:
108109
SLUG_BRANCH_NAME=$(echo "${BRANCH_NAME}" | sed 's/[^[:alnum:]]/-/g' | tr -s '-' | tr A-Z a-z)
109110
echo "SLUG_BRANCH_NAME=${SLUG_BRANCH_NAME}"
110111
echo "GITHUB_HEAD_REF_SLUG=${SLUG_BRANCH_NAME}" >> $GITHUB_ENV
111-
112+
112113
- name: check diffrence in deployed and local stacks
113114
if: ${{ inputs.deploy != 'true' }}
114-
run: yarn sst diff --stage ${{ inputs.app-env }}
115+
run: yarn sst diff --stage ${{ inputs.app-env }}
115116

116117
- name: Deploy and get API endpoint
117118
if: ${{ inputs.deploy == 'true' && ((github.event.action == 'opened' && inputs.preview == 'true') || (github.event.action == 'synchronize' && inputs.preview == 'true') || (github.event.pull_request.merged == true && inputs.preview == 'false' && inputs.app-env == 'staging') || (inputs.app-env == 'production' && startsWith(github.ref, 'refs/tags/v'))) }}
@@ -143,3 +144,4 @@ jobs:
143144
with:
144145
token: ${{ secrets.token }}
145146
environment: ${{ github.head_ref }}
147+
...

0 commit comments

Comments
 (0)