Skip to content

Commit 99d662f

Browse files
committed
Add manual trigger for 'updateRelease'-workflow and use project-bot
Adding a manual trigger allows to re-run that job manually with the latest changes applied to the referenced workflow from the releng.aggregator repository. And since we have a eclipse bot specifically for each project we can use that bot as author of these automated changes instead of the generic GH bot.
1 parent 9340514 commit 99d662f

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

.github/workflows/updateRelease.yml

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@ name: Update For Next Release
22

33
on:
44
workflow_call:
5+
inputs:
6+
nextReleaseVersion:
7+
description: 'The version of the release, for example: 4.35'
8+
type: string
9+
required: true
10+
botName:
11+
description: The name of the bot that authos the changes
12+
type: string
13+
default: 'Eclipse Releng Bot'
14+
botMail:
15+
description: The name of the bot that authos the changes
16+
type: string
17+
default: '[email protected]'
18+
secrets:
19+
githubBotPAT:
20+
description: The personal access token (with scope 'public_repo') of the bot to push a required change to a branch.
21+
522
jobs:
623
update:
724
runs-on: ubuntu-latest
8-
if: contains(github.event.milestone.description, 'Release')
925
steps:
1026
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1127
with:
@@ -24,15 +40,18 @@ jobs:
2440
- name: Update Versions
2541
run: >-
2642
mvn -U -B -ntp
27-
org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
28-
org.eclipse.tycho:tycho-versions-plugin:set-parent-version -DnewParentVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
29-
- name: Create Pull Request for Release ${{ github.event.milestone.title }}
43+
org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${{ inputs.nextReleaseVersion }}.0-SNAPSHOT
44+
org.eclipse.tycho:tycho-versions-plugin:set-parent-version -DnewParentVersion=${{ inputs.nextReleaseVersion }}.0-SNAPSHOT
45+
- name: Create Pull Request for Release ${{ inputs.nextReleaseVersion }}
3046
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
3147
with:
32-
commit-message: Update for release ${{ github.event.milestone.title }}
33-
branch: update_R${{ github.event.milestone.title }}
34-
title: Update for release ${{ github.event.milestone.title }}
35-
body: A new release milstone was created, please review the changes and merge if appropriate.
48+
token: ${{ secrets.githubBotPAT || secrets.GITHUB_TOKEN }}
49+
commit-message: Update for release ${{ inputs.nextReleaseVersion }}
50+
branch: update_R${{ inputs.nextReleaseVersion }}
51+
title: Update for release ${{ inputs.nextReleaseVersion }}
52+
body: A new release milestone was created, please review the changes and merge if appropriate.
53+
author: ${{ inputs.botName }} <${{ inputs.botMail }}>
54+
committer: ${{ inputs.botName }} <${{ inputs.botMail }}>
3655
delete-branch: true
3756
milestone: ${{ github.event.milestone.number }}
3857
add-paths: |

0 commit comments

Comments
 (0)