The script will check if it's a greenkeeper branch, which is update the package.json
. The commit will be a [ci skip]
, meaning there will not trigger a second build for the push.
You can override this default environment variables:
PROJECT_LOCKFILE="package-lock.json"
GITHUB_EMAIL="task-runner@ci"
GITHUB_NAME="Circle CI<$GITHUB_EMAIL>"
Follow this instructions in order to allow CircleCI to push on the repo: https://circleci.com/docs/1.0/github-security-ssh-keys/
Add a run task:
- run:
name: Update Lockfile
command: .circleci/commit-lockfile.sh
Recommended at the end of the tasks / if everything is green
For Travis, you should also define GITHUB_TOKEN
environment variable with push abilities.
Add the task:
after_success:
- bash ci/commit-lockfile.sh
Or during your favorite lifecycle step