-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 Add
latest-changes
workflow action (#203)
👷 Add `latest-changes` workflow action
- Loading branch information
Showing
5 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Use the latest-changes action to generate a release.md file with the latest changes. | ||
|
||
# Thanks to @tiangolo for the original action, [see here](https://github.com/tiangolo/fastapi/blob/master/.github/workflows/latest-changes.yml). | ||
|
||
|
||
name: Latest Changes | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- main | ||
types: | ||
- closed | ||
workflow_dispatch: | ||
inputs: | ||
number: | ||
description: PR number | ||
required: true | ||
debug_enabled: | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: 'false' | ||
|
||
jobs: | ||
latest-changes: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- uses: actions/checkout@v4 | ||
with: | ||
# To allow latest-changes to commit to the main branch | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
# Allow debugging with tmate | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} | ||
with: | ||
limit-access-to-actor: true | ||
- uses: docker://tiangolo/latest-changes:0.3.0 | ||
# - uses: tiangolo/latest-changes@main | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
latest_changes_file: docs/release.md | ||
latest_changes_header: '## Latest Changes' | ||
end_regex: '^## ' | ||
debug_logs: true | ||
label_header_prefix: '### ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Release Notes | ||
|
||
## Latest Changes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters