-
Notifications
You must be signed in to change notification settings - Fork 201
31 lines (27 loc) · 1.21 KB
/
changelog-deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: "Automatically update changelog with dependabot"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
jobs:
changelog-update:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'dependabot')
# TODO: feat: try to use author of the commit(s) to see if it's dependabot
# instead of using labels. Labels work fine for now.
# ${{ any(contains(commit.author.username, 'dependabot') for commit in github.event.commits) }}
steps:
- uses: actions/checkout@v4
with:
# Token with permissions for pushing commits and editting GH issues
token: ${{ secrets.NIBIRU_PM }}
# to avoid checking out the repo in a detached state
ref: ${{ github.head_ref }}
# Helps keep your repository up-to-date when Dependabot updates your dependencies.
# This step updates adds a line to the "## Unreleased" section
- uses: dangoslen/dependabot-changelog-helper@v3
with:
activationLabel: "dependabot"
changelogPath: "./CHANGELOG.md"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Updated changelog - dependabot"