File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 6363
6464 - name : Install dependencies
6565 run : pnpm install
66+ # This step is meant to update pnpm-lock.yaml file on Dependabot
67+ # pull requests. Right now dependabot not work fine with monorepos
68+ # so we have to do extra work to automatically update lock file.
69+ # This step is part of "check" job, but could be part of any other job.
70+ # We put it here just because previous `Install dependencies` step is just
71+ # first "install" in this workflow.
72+ # The idea of this step - if install fails, try to fix lock file, commit and
73+ # push changes.
74+ # NOTE: we use magic string ([dependabot skip]) to allow branch rebase,
75+ # read more at link below
76+ # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/managing-pull-requests-for-dependency-updates#allowing-dependabot-to-rebase-and-force-push-over-extra-commits
77+ - name : Update pnpm-lock.yaml on Dependabot pull request
78+ if : ${{ failure() && github.actor == 'dependabot[bot]' }}
79+ # https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
80+ run : |
81+ pnpm install --no-frozen-lockfile
82+ git config user.name github-actions
83+ git config user.email [email protected] 84+ git add pnpm-lock.yaml
85+ git commit -m "build: update pnpm-lock.yaml [dependabot skip]"
86+ git push
6687 - name : Lint code
6788 run : pnpm run lint ${{ needs.setup-options.outputs.since-flag }}
6889 - name : Run unit tests
You can’t perform that action at this time.
0 commit comments