Skip to content

Commit

Permalink
#1070: No need to setup node-js - it is already setup on ubuntu-latest (
Browse files Browse the repository at this point in the history
  • Loading branch information
laingsimon authored Nov 2, 2024
2 parents ca53edc + 5a7c5ef commit 7a92c09
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/automated-npm-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,36 @@ jobs:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
cache: 'npm'

- name: Install dependencies
run: npm ci
working-directory: ./CourageScores/ClientApp

- name: Report outdated modules
run: npm outdated
continue-on-error: true
working-directory: ./CourageScores/ClientApp

- name: Update packages
run: npm update
working-directory: ./CourageScores/ClientApp

- name: Check for changes
id: git-check
run: |
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
git diff --exit-code --stat || echo "changes=true" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: ${{ steps.git-check.outputs.changes == 'true' }}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
base: develop
base: main
add-paths: |
package-lock.json
package.json
CourageScores/ClientApp/package-lock.json
CourageScores/ClientApp/package.json
commit-message: Update npm dependencies
title: ${{ env.pr_title }}
body: 'Automated npm update via GitHub workflow'
branch: automated-npm-update
delete-branch: true
branch: automated/npm-update
delete-branch: true
assignees: laingsimon

0 comments on commit 7a92c09

Please sign in to comment.