Skip to content

Commit

Permalink
chore: npm update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
iowillhoit committed Aug 23, 2023
1 parent 9f8e581 commit 801cd81
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ updates:
prefix-development: chore(dev-deps)
ignore:
- dependency-name: '@salesforce/dev-scripts'
- dependency-name: 'npm' # Updated with update-npm-version.yml
- dependency-name: '*'
update-types: ['version-update:semver-major']
32 changes: 32 additions & 0 deletions .github/workflows/update-npm-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: update-npm-version

# https://github.com/forcedotcom/cli/issues/2327
# Customer needs an npm version that has been bundled with node lts
# We will install the version that is included with the runner's node

on:
workflow_dispatch:
schedule:
# Tuesday 7a central (12 UTC)
- cron: '0 12 * * 2'

jobs:
update-node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn add npm@$(npm -v)
- uses: salesforcecli/github-workflows/.github/actions/gitConfig@main
# Push changes if 'git status' is not empty
- run: |
if [[ -n $(git status --short) ]]; then
git add -A
git commit -m "fix: update npm version"
git push
else
echo "Already up to date"
fi

0 comments on commit 801cd81

Please sign in to comment.