Skip to content

Commit

Permalink
standardised workflows and package updates (#48)
Browse files Browse the repository at this point in the history
* standardised workflows and package updates

* update trivy

* update with new gha workflows
  • Loading branch information
joshuafernandes authored Sep 13, 2024
1 parent c971f73 commit 7829c7e
Show file tree
Hide file tree
Showing 10 changed files with 4,321 additions and 4,204 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
name: Build

on:
workflow_call:
pull_request:
branches:
- main
# 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:
name: Build
runs-on: ubuntu-latest
# the enviroment to deploy to / use secrets from
environment: no-secret
# modify the default permissions of the GITHUB_TOKEN, so as to only allow least priveleges
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build
uses: ConsenSys/docs-gha/build@main
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ jobs:
strategy:
matrix:
folder: ["docs"]
# the enviroment to deploy to / use secrets from
environment: no-secret
# modify the default permissions of the GITHUB_TOKEN, so as to only allow least priveleges
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Case check action
uses: ConsenSys/docs-gha/case@main
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Dependency Review'

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
assignees:
- "protocol-galileo"
22 changes: 22 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Check for broken links

on:
pull_request:
branches:
- main

jobs:

linkCheck:
name: Link Checking
runs-on: ubuntu-latest
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v4
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
26 changes: 7 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: Check for lint/build errors
name: Check for lint errors

on:
pull_request:
Expand All @@ -8,31 +8,19 @@ on:

jobs:
lint:
name: Lint Code Base, Spelling, Link Check
name: Lint
runs-on: ubuntu-latest
# the enviroment to deploy to / use secrets from
environment: no-secret
# modify the default permissions of the GITHUB_TOKEN, so as to only allow least priveleges
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

linkCheck:
name: Link Checking
runs-on: ubuntu-latest
environment: no-secret
strategy:
matrix:
file-extensions: [".md", ".mdx"]
steps:
- uses: actions/checkout@v3
- name: LinkCheck
uses: ConsenSys/docs-gha/linkcheck@main
- name: Lint markdown
uses: ConsenSys/docs-gha/lint-markdown@main
with:
FILE_EXTENSION: ${{ matrix.file-extensions }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/spelling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Check for spelling with vale

on:
pull_request:
branches:
- main

jobs:
vale:
name: Spelling
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Vale
uses: Consensys/docs-gha/spelling@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILEPATHS: "docs"

18 changes: 18 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Trivy

on:
pull_request:
branches:
- main

jobs:
trivy:
name: Run trivy scanner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Trivy
uses: ConsenSys/docs-gha/trivy@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v19.4.0
v20.14.0
Loading

0 comments on commit 7829c7e

Please sign in to comment.