-
Notifications
You must be signed in to change notification settings - Fork 93
58 lines (53 loc) · 2 KB
/
changelog_pr.yaml
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
53
54
55
56
57
58
name: Offline Changelog
on:
release:
types:
- published
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
chanagelog-pr:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@ea8b747819ff6d82907eb4018229f1a75c174697
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
fetch-depth: 0
- uses: heinrichreimer/github-changelog-generator-action@e60b5a2bd9fcd88dadf6345ff8327863fb8b490f
with:
token: ${{ secrets.CR_TOKEN }}
project: k8gb
output: CHANGELOG-latest.md
pullRequests: true
author: true
issues: true
issuesWoLabels: true
prWoLabels: true
onlyLastTag: true
compareLink: true
filterByMilestone: true
unreleased: false
- name: Prepend the latest changes to CHANGELOG.md
run: |
mv CHANGELOG.md CHANGELOG-old.md
cat CHANGELOG-latest.md | sed -e'$d' > CHANGELOG.md
cat CHANGELOG-old.md | sed -e'1,2d' >> CHANGELOG.md
rm CHANGELOG-old.md CHANGELOG-latest.md
- name: Create Pull Request
uses: peter-evans/create-pull-request@9e49b1873f5025c48e485cb5cdc74d652decf03e
with:
title: "Update Offline Changelog"
branch: offline_changelog
delete-branch: true
base: master
signoff: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Send http get to doc.crds.dev to index a new version
run: |
curl -sL https://doc.crds.dev/github.com/k8gb-io/k8gb@${{ github.event.release.tag_name }} | grep -A2 'class="container"'