forked from Gitea/helm-actions

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://github.com/actions/checkout) | action | major | `v4` -> `v5` | | [actions/checkout](https://github.com/actions/checkout) | action | major | `v4.2.2` -> `v5` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v5`](https://github.com/actions/checkout/compare/v4...v5) [Compare Source](https://github.com/actions/checkout/compare/v4...v5) </details> --- ### Configuration 📅 **Schedule**: Branch creation - Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xOC4xIiwidXBkYXRlZEluVmVyIjoiNDEuMTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsia2luZC9kZXBlbmRlbmN5Il19--> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/53 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com> Reviewed-by: DaanSelen <daanselen@noreply.gitea.com> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Renovate Bot <renovate-bot@gitea.com> Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
33 lines
1.3 KiB
YAML
33 lines
1.3 KiB
YAML
name: changelog
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
changelog:
|
|
runs-on: ubuntu-latest
|
|
container: docker.io/thegeeklab/git-sv:1.0.12
|
|
steps:
|
|
- name: install tools
|
|
run: |
|
|
apk add -q --update --no-cache nodejs curl jq sed
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Generate upcoming changelog
|
|
run: |
|
|
git sv rn -o changelog.md
|
|
export RELEASE_NOTES=$(cat changelog.md)
|
|
export ISSUE_NUMBER=$(curl -s "https://gitea.com/api/v1/repos/gitea/helm-actions/issues?state=open&q=Changelog%20for%20upcoming%20version" | jq '.[].number')
|
|
|
|
echo $RELEASE_NOTES
|
|
JSON_DATA=$(echo "" | jq -Rs --arg title 'Changelog for upcoming version' --arg body "$(cat changelog.md)" '{title: $title, body: $body}')
|
|
|
|
if [ -z "$ISSUE_NUMBER" ]; then
|
|
curl -s -X POST "https://gitea.com/api/v1/repos/gitea/helm-actions/issues" -H "Authorization: token ${{ secrets.ISSUE_RW_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA"
|
|
else
|
|
curl -s -X PATCH "https://gitea.com/api/v1/repos/gitea/helm-actions/issues/$ISSUE_NUMBER" -H "Authorization: token ${{ secrets.ISSUE_RW_TOKEN }}" -H "Content-Type: application/json" -d "$JSON_DATA"
|
|
fi
|