Skip to content

Commit 72ced92

Browse files
committed
🔨 Add latest-changes workflow to generate HISTORY.md file
1 parent c9887d8 commit 72ced92

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Use the latest-changes action to generate a HISTORY.md file with the latest changes.
2+
3+
# Thanks to @tiangolo for the original action, [see here](https://github.com/tiangolo/fastapi/blob/master/.github/workflows/latest-changes.yml).
4+
5+
6+
name: Latest Changes
7+
8+
on:
9+
pull_request_target:
10+
branches:
11+
- main
12+
types:
13+
- closed
14+
workflow_dispatch:
15+
inputs:
16+
number:
17+
description: PR number
18+
required: true
19+
debug_enabled:
20+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
21+
required: false
22+
default: 'false'
23+
24+
jobs:
25+
latest-changes:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Dump GitHub context
29+
env:
30+
GITHUB_CONTEXT: ${{ toJson(github) }}
31+
run: echo "$GITHUB_CONTEXT"
32+
- uses: actions/checkout@v4
33+
with:
34+
# To allow latest-changes to commit to the main branch
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
# Allow debugging with tmate
37+
- name: Setup tmate session
38+
uses: mxschmitt/action-tmate@v3
39+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
40+
with:
41+
limit-access-to-actor: true
42+
- uses: docker://tiangolo/latest-changes:0.3.0
43+
# - uses: tiangolo/latest-changes@main
44+
with:
45+
token: ${{ secrets.GITHUB_TOKEN }}
46+
latest_changes_file: HISTORY.md
47+
latest_changes_header: '## Latest Changes'
48+
end_regex: '^## '
49+
debug_logs: true
50+
label_header_prefix: '### '

0 commit comments

Comments
 (0)