Skip to content

Commit

Permalink
refactor: update ci dependencies and commit/pr audit report using the…
Browse files Browse the repository at this point in the history
… bot
  • Loading branch information
enisdenjo committed Jan 23, 2025
1 parent e3749c8 commit 5180fdf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
36 changes: 26 additions & 10 deletions .github/workflows/audits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Summary
run: cat implementations/${{ matrix.workspace }}/README.md >> $GITHUB_STEP_SUMMARY
- name: Upload audit report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: audit-reports
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
Expand Down Expand Up @@ -76,14 +76,14 @@ jobs:
- name: Set up docker buildx
uses: docker/setup-buildx-action@v2
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
- name: Install
run: yarn install --immutable
- name: Bake
uses: docker/bake-action@v2
uses: docker/bake-action@v6
with:
workdir: implementations/${{ matrix.workspace }}
load: true # load image into docker, otherwise `docker compose up` will rebuild
Expand All @@ -97,7 +97,7 @@ jobs:
- name: Summary
run: cat implementations/${{ matrix.workspace }}/README.md >> $GITHUB_STEP_SUMMARY
- name: Upload audit report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: audit-reports
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
Expand All @@ -124,7 +124,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand All @@ -135,7 +135,7 @@ jobs:
- name: Summary
run: cat implementations/${{ matrix.workspace.name }}/README.md >> $GITHUB_STEP_SUMMARY
- name: Upload audit report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: audit-reports
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
Expand All @@ -158,16 +158,32 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{secrets.BOT_GITHUB_TOKEN}}
- name: Download audit reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: audit-reports
- name: Render servers table
run: node scripts/render-servers-table.mjs
- name: Diff
run: git diff --pretty
- name: Commit
if: github.ref != 'refs/heads/main'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'docs(implementations): audit report'
commit_user_name: theguild-bot
commit_user_email: [email protected]
commit_author: theguild-bot <[email protected]> # dont use the actor as an author
- name: Create PR
if: github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@v7
with:
branch: audit-report/${{ github.ref_name }}
token: ${{secrets.BOT_GITHUB_TOKEN}}
branch: audit-report
title: Audit Report
body: New audit report available.
body: New audit report available
commit-message: 'docs(implementations): audit report'
committer: theguild-bot <[email protected]>
author: theguild-bot <[email protected]> # dont use the actor as an author
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand All @@ -35,7 +35,7 @@ jobs:
with:
fetch-depth: 0 # necessary for correct changelog
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand All @@ -61,7 +61,7 @@ jobs:
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 0 # necessary for correct CHANGELOGS
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set up node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: yarn
Expand Down

0 comments on commit 5180fdf

Please sign in to comment.