-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (41 loc) · 1.6 KB
/
update-kiota.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
# This workflow will update the Kiota generator version in the Makefile and it will
# re-generate the client opening a pull request with those changes.
name: Update Kiota generator version
on:
workflow_dispatch:
inputs:
version:
description: New Kiota version
required: true
branch:
description: Target branch to open the PR against
required: false
default: main
jobs:
update-kiota:
name: update-kiota/${{ github.event.inputs.version }}/${{ github.event.inputs.branch }}
runs-on: ubuntu-latest
env:
PYTHON_VERSION: "3.10"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
persist-credentials: false
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Update Kiota version
run: sed -i 's/KIOTA_VERSION ?= ".*"/KIOTA_VERSION ?= "v${{ github.event.inputs.version }}"/g' Makefile
- name: Create Pull Request
uses: gr2m/create-or-update-pull-request-action@v1
env:
GITHUB_TOKEN: ${{ secrets.RH_PERF_BOT_TOKEN }}
with:
title: Update Kiota version to ${{ github.event.inputs.version }}
body: >
Updating Kiota version to ${{ github.event.inputs.version }}.
Verify there are no breaking changes.
branch: update-kiota-version-${{ github.event.inputs.branch }}-${{ github.event.inputs.version }}
commit-message: Update kiota version to ${{ github.event.inputs.version }}