Skip to content

Commit

Permalink
updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vijay-stephen committed Jul 23, 2024
1 parent fbf36bf commit cde9972
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/snyk.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
name: snyk

on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
branches:
- "**" # matches every branch
- "!main" # excludes main
- '**' # matches every branch
- '!main' # excludes main
pull_request:
branches:
- main

jobs:
security:
runs-on: ubuntu-latest
runs-on:
- ubuntu-latest
name: snyk
steps:
- name: checkout
Expand All @@ -22,13 +23,13 @@ jobs:
with:
command: monitor
args: --severity-threshold=low
- name: Set up Node 18
- name: Set up Node 16
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 16
- name: install Snyk CLI
run: npm install -g snyk
- name: snyk monitor
run: snyk iac test --report --severity-threshold=medium
run: snyk iac test --report
env:
SNYK_TOKEN: ${{ secrets.ARC_SNYK_TOKEN }}
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
---
name: Test

on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
branches:
- "**" # matches every branch
- "!main" # excludes main
- '**' # matches every branch
- '!main' # excludes main
pull_request:
branches:
- main

jobs:
tflint:
runs-on: ubuntu-latest
runs-on:
- ubuntu-latest
name: tflint
steps:
- uses: actions/checkout@master
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,41 @@
---
name: Update-docs
on: # yamllint disable-line rule:truthy
on: # yamllint disable-line rule:truthy
push:
branches:
- main
paths:
- 'README.md'
jobs:
transfer-file:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pushes readme file
- name: Pushes Readme file
uses: dmnemec/copy_file_to_another_repo_action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_TOKEN_GITHUB: ${{ secrets.ARC_DOCS_API_TOKEN_GITHUB }}
with:
source_file: 'README.md'
destination_repo: 'sourcefuse/arc-docs'
destination_folder: 'docs/arc-iac-docs/modules/terraform-aws-ref-arch-db'
destination_folder: 'docs/arc-iac-docs/modules/terraform-aws-arc-db'
user_email: '[email protected]'
user_name: ${{ github.actor }}
commit_message: ${{ github.event.head_commit.message }}
- name: Pushes to another repository
uses: cpina/github-action-push-to-another-repository@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
API_TOKEN_GITHUB: ${{ secrets.ARC_DOCS_API_TOKEN_GITHUB }}
with:
source-directory: 'static'
destination-github-username: 'sourcefuse'
destination-repository-name: 'arc-docs'
target-directory: 'docs/arc-iac-docs/modules/terraform-aws-arc-db/static'
user-email: '[email protected]'
user-name: ${{ github.actor }}
target-branch: main
commit-message: ${{ github.event.head_commit.message }}
- name: Pushes Module Usage Guide
uses: dmnemec/copy_file_to_another_repo_action@main
env:
Expand All @@ -32,7 +44,7 @@ jobs:
with:
source_file: 'docs/module-usage-guide/README.md'
destination_repo: 'sourcefuse/arc-docs'
destination_folder: 'docs/arc-iac-docs/modules/terraform-aws-ref-arch-db/docs/module-usage-guide'
destination_folder: 'docs/arc-iac-docs/modules/terraform-aws-arc-db/docs/module-usage-guide'
user_email: '[email protected]'
user_name: ${{ github.actor }}
commit_message: ${{ github.event.head_commit.message }}

0 comments on commit cde9972

Please sign in to comment.