Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ jobs:
run: |
npm outdated > npm-outdated-report.txt || echo "Some packages may be outdated."

- name: Updates the outdated dependencies
run:
npx npm-check-updates -u
npm update

- name: Commit changes push them
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add package.json package-lock.json
git commit -m "chore: update outdated npm packages"
git push origin HEAD || echo "No changes to push"

- name: Create Pull Request for updated Dependenncies
uses: peter-evans/create-pull-request@v5
with:
branch: update-dependencies-branch
title: "chore: update outdated npm dependencies"
body: |
This PR updates the following outdated npm dependencies:
- Updated dependencies using npm-check-updates
- Automatically created by GitHub Actions
commit-message: "chore: update outdated npm dependencies"
labels: "dependencies, automated update"
assignees: "your-github-username" # Optional: assign the PR to someone
- name: Handling empty files
run: |
is_empty(){
Expand Down
Loading