-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (45 loc) · 1.74 KB
/
deb-update-changelog.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Update Debian Package Changelog
on:
push:
branches:
- master
env:
CHANGELOG_AUTHOR_NAME: "pi-top"
CHANGELOG_AUTHOR_EMAIL: "deb-maintainers@pi-top.com"
COMMIT_MESSAGE_PREFIX: "New changelog entry:"
jobs:
bump-changelog-on-pr:
runs-on: ubuntu-20.04
# if last commit was not a merge of the changelog
# env vars can't be used in if checks
if: ${{ ! contains(github.event.head_commit.message, 'New changelog entry:') }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- id: version
uses: docker://lpenz/ghaction-version-gen:0.11.0
- name: Add changelog entry for release version
id: bump_changelog
uses: pi-top/git-debian-changelog-bump-action@master
with:
release: true
author_name: ${{ env.CHANGELOG_AUTHOR_NAME }}
author_email: ${{ env.CHANGELOG_AUTHOR_EMAIL }}
snapshot_number: ${{ steps.version.outputs.distance }}
since: ${{ steps.version.outputs.tag_latest }}
# Don't include previous changelog version bump commits in changelog
ignore_regex: |
${{ env. COMMIT_MESSAGE_PREFIX }}
\[pre-commit.ci\]
- name: Fix .git permissions
# Fix "error: insufficient permission for adding an object to repository database .git/objects"
run: sudo chmod -R ugo+rwX .git
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: "${{ env.COMMIT_MESSAGE_PREFIX }} v${{ steps.bump_changelog.outputs.version }}"
branch: bump-changelog
title: "${{ env.COMMIT_MESSAGE_PREFIX }} v${{ steps.bump_changelog.outputs.version }}"
body: ""