-
Notifications
You must be signed in to change notification settings - Fork 16
50 lines (43 loc) · 1.36 KB
/
update-parent-version.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# @author Ivan Senic
name: Update Parent Version
# runs on
# * stargate v2.1 release event
# * manual trigger
on:
repository_dispatch:
types: [ stargate-v21-release ]
workflow_dispatch:
inputs:
version:
description: 'Stargate version to update, for example `v2.1.0`.'
required: true
type: string
jobs:
main:
name: Main
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
# update version
# use input or the event payload value
- name: Update version
id: update
run: |
VERSION=${{ inputs.version != null && inputs.version || github.event.client_payload.version }}
echo "Resolved version to update to $VERSION"
./scripts/bump_stargate.sh ${VERSION}
echo "version=${VERSION}" >> $GITHUB_OUTPUT
# commit and create pr
- name: Create pull-request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Use Stargate ${{ steps.update.outputs.version }}
branch: create-pull-request/update-stargate
branch-suffix: short-commit-hash
base: main
title: Use Stargate ${{ steps.update.outputs.version }}
body: |
Automated changes that try to update Stargate version.