-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add Snyk Update GitHub Actions workflow
- Loading branch information
1 parent
5dbfcee
commit d9faf1f
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Snyk Update | ||
|
||
on: pull_request | ||
|
||
permissions: | ||
checks: write | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
snyk-update: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Checkout PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: gh pr checkout ${{ github.event.pull_request.number }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22" # Specify the Node.js version you use | ||
|
||
- name: Set up Bun | ||
uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version: "latest" # Specify the Bun version you want | ||
|
||
- name: Set up pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: "latest" # Specify the pnpm version you want | ||
|
||
- name: Install Bun dependencies | ||
run: bun install -y | ||
|
||
- name: Update npm dependencies | ||
run: npm install --package-lock-only | ||
|
||
- name: Update pnpm dependencies | ||
run: pnpm install --no-frozen-lockfile --lockfile-only | ||
|
||
- name: Commit changes | ||
run: | | ||
git config user.name "snyk-bot" | ||
git config user.email "snyk-bot@snyk.io" | ||
git add . | ||
git commit --amend --no-edit | ||
- name: Push changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: git push --force |