-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to copy Resolutions to Overrides
- Loading branch information
Showing
1 changed file
with
35 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,35 @@ | ||
name: Copy Yarn Resolutions to npm Overrides | ||
|
||
on: | ||
push: | ||
branches: | ||
# Match every branch except for main | ||
- '**' | ||
- '!main' | ||
|
||
jobs: | ||
build: | ||
name: Copy Yarn Resolutions to npm Overrides | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# To trigger further `on: [push]` workflow runs | ||
# Ref: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs | ||
# Ref: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-using-ssh-deploy-keys | ||
with: | ||
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: Copy "resolutions" object to "overrides" in package.json | ||
run: yq --inplace --output-format=json '.overrides = .resolutions' package.json | ||
|
||
- name: Install any updated dependencies | ||
run: npm install | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Update Overrides from Resolutions |