-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (42 loc) · 1.39 KB
/
workflow-update-spec.yml
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
name: workflow-update-spec
on:
repository_dispatch:
types: [new-bonita-openapi-spec-release]
workflow_dispatch:
inputs:
specVersion:
description: 'The version of the Bonita OpenAPI spec'
required: true
type: string
env:
spec_version: ${{ github.event.client_payload.spec_version || inputs.specVersion }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: maven
- name: Compile and test project
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./mvnw -ntp versions:set-property -DnewVersion=${{env.spec_version}} -Dproperty=bonita-openapi.version
./mvnw -ntp groovy:execute@update-spec
./mvnw -ntp generate-sources -Dcodegen.skip=false
./mvnw -ntp spotless:apply
./mvnw -B -ntp clean verify
- name: Open Pull Request
uses: peter-evans/create-pull-request@v6
id: create-pr
with:
branch: feat/update-bonita-openapi-spec
base: dev
commit-message: "feat(openapi): update version"
title: "feat(openapi): update version"
body: |
Update Bonita OpenAPI spec with ${{env.spec_version}} version.