generated from salesforcecli/plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f8e581
commit 801cd81
Showing
2 changed files
with
33 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
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,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 |