Skip to content

Commit

Permalink
Add manual trigger for 'updateRelease'-workflow and use project-bot
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
HannesWell committed Nov 23, 2024
1 parent 56ba8ab commit 13a2278
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions .github/workflows/updateRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@ name: Update For Next Release

on:
workflow_call:
inputs:
nextReleaseVersion:
description: 'The version of the release, for example: 4.35'
type: string
required: true
botName:
description: The name of the bot that authos the changes
type: string
required: true
botMail:
description: The name of the bot that authos the changes
type: string
required: true
secrets:
githubBotPAT:
description: The personal access token (with scope 'public_repo') of the bot to push a required change to a branch.
required: true

jobs:
update:
runs-on: ubuntu-latest
if: contains(github.event.milestone.description, 'Release')
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
Expand All @@ -23,20 +40,19 @@ jobs:
cache: maven
- name: Update Versions
run: >-
mvn -U -Pbuild-individual-bundles -ntp
org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
org.eclipse.tycho:tycho-versions-plugin:set-parent-version -DnewParentVersion=${{ github.event.milestone.title }}.0-SNAPSHOT
- name: Create Pull Request for Release ${{ github.event.milestone.title }}
mvn -U -B -ntp
org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=${{ inputs.nextReleaseVersion }}.0-SNAPSHOT
org.eclipse.tycho:tycho-versions-plugin:set-parent-version -DnewParentVersion=${{ inputs.nextReleaseVersion }}.0-SNAPSHOT
- name: Create Pull Request for Release ${{ inputs.nextReleaseVersion }}
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
commit-message: Update for release ${{ github.event.milestone.title }}
branch: update_R${{ github.event.milestone.title }}
title: Update for release ${{ github.event.milestone.title }}
body: A new release milstone was created, please review the changes and merge if appropriate.
token: ${{ secrets.githubBotPAT }}
commit-message: Update for release ${{ inputs.nextReleaseVersion }}
branch: update_R${{ inputs.nextReleaseVersion }}
title: Update for release ${{ inputs.nextReleaseVersion }}
body: A new release milestone was created, please review the changes and merge if appropriate.
author: ${{ inputs.botName }} <${{ inputs.botMail }}>
delete-branch: true
milestone: ${{ github.event.milestone.number }}
add-paths: |
pom.xml
**/pom.xml
**/*.MF

0 comments on commit 13a2278

Please sign in to comment.