Skip to content

Commit

Permalink
Merge pull request #37 from Consensys/trivy
Browse files Browse the repository at this point in the history
update to standardised workflows
  • Loading branch information
joshuafernandes authored Jul 10, 2024
2 parents 6470ba7 + 0cb0f77 commit e2d2d78
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
name: Build

on:
workflow_call:
pull_request:
branches:
- main
workflow_call:
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
Expand All @@ -16,9 +14,9 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build
uses: Consensys/docs-gha/build@main
uses: ConsenSys/docs-gha/build@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ on:
pull_request:
branches:
- main
workflow_call:

jobs:
case:
name: Check for case being inconsistent
runs-on: ubuntu-latest
strategy:
matrix:
folder: ["docs", "blog"]
folder: ["docs"]
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Case check action
uses: Consensys/docs-gha/case@main
uses: ConsenSys/docs-gha/case@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOC_DIR: ${{ matrix.folder }}
SKIP_TEST: true
30 changes: 18 additions & 12 deletions .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
name: 'Dependency Review'
---
name: Check file name case

on: [pull_request]

permissions:
contents: read
on:
pull_request:
branches:
- main

jobs:
dependency-review:
case:
name: Check for licences not being allowed
runs-on: ubuntu-latest
strategy:
matrix:
folder: ["docs"]
permissions:
contents: read
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v3
- uses: actions/checkout@v3

- name: Dependency review
uses: ConsenSys/docs-gha/dependency-review@main
with:
fail-on-severity: high
deny-licenses: LGPL-2.0, BSD-2-Clause
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 6 additions & 7 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
---
name: Check for lint/build errors
name: Check for lint, spelling and link errors

on:
pull_request:
branches:
- main
workflow_call:

jobs:
lint:
name: Lint Code Base, Spelling
name: Lint Code Base, Spelling, Link Check
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Lint
uses: Consensys/docs-gha/lint@main
uses: ConsenSys/docs-gha/lint@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -28,8 +27,8 @@ jobs:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: LinkCheck
uses: Consensys/docs-gha/linkcheck@main
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}

0 comments on commit e2d2d78

Please sign in to comment.