Hello everyone,
I’d like to announce niv-updater-action, a GitHub action to keep niv managed dependencies up. Once set up, if can ran on schedule to track updates to all dependencies that are managed by niv. If there is an update, it will create a PR, one for each outdated dependency, with a nice list of changes.
The project is hosted here: https://github.com/knl/niv-updater-action
You can add it to your github actions as simple as:
name: Automated niv-managed dependency updates
on:
schedule:
# * is a special character in YAML so you have to quote this string
# run this every day at 4:00am
- cron: '0 4 * * *'
jobs:
niv-updater:
name: 'Create PRs for niv-managed dependencies'
runs-on: ubuntu-latest
steps:
# notice there is no checkout step
- name: niv-updater-action
uses: knl/niv-updater-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# NOTE: All inputs are optional. This list them with their default values.
# Use the default branch for the repository
pull_request_base: ''
# The prefix to add to every created branch
branch_prefix: 'update/'
# If there are revisions in form 'v1.2' (not SHAs), skip updating them
skip_versioned_revisions: true
# Do not skip dependencies in repos accessed via ssh from updating
skip_ssh_repos: false
# Update all dependencies tracked by niv. Another example: 'common,jq,hub'
whitelist: ''
# Do not blacklist any of the dependencies. Another example: 'nixpkgs,niv'
blacklist: ''
# Note that | is really important for the labels
labels: |
documentation
good first issue
# Let's not show merges in the changelog
show_merges: false
# Have some prefix and a suffix. Use '|' to keep newlines
message_prefix: |
## Motivation
Dependencies should be up to date.
message_suffix:
Notify @myorg/myteam.