-
Notifications
You must be signed in to change notification settings - Fork 4
89 lines (77 loc) · 2.57 KB
/
schema-release.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on: repository_dispatch
jobs:
updateImage:
name: "Check Event"
runs-on: ubuntu-latest
if: github.event.action == 'dragonfly_schema_release'
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: refs/heads/master
token: ${{ secrets.GH_TOKEN }}
- name: Set up npm
uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 1.8
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64
- name: "Install OpenAPI-generator"
run: |
npm install @openapitools/openapi-generator-cli@cli-4.3.0 -g
- name: "Run Update Script"
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
bash download.sh $VERSION
bash generate.sh
- name: "Set Commit Message"
id: vars
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
echo ::set-output name=commit_message::"Update Schema to $VERSION"
- name: "Commit and Push Changes"
id: push
env:
COMMIT_MESSAGE: ${{ steps.vars.outputs.commit_message }}
run: |
git config --global user.name 'ladybugbot'
git config --global user.email 'ladybugbot@users.noreply.github.com'
git add .
git commit -m "$COMMIT_MESSAGE"
git push
bump_honeybee_schema_dotnet:
name: "Check Event"
runs-on: ubuntu-latest
if: github.event.action == 'honeybee_schema_dotnet_release'
steps:
- name: "Checkout Master Branch"
uses: actions/checkout@v2
with:
ref: refs/heads/master
token: ${{ secrets.DEPS_UPDATING }}
- name: "Run Update Script"
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
export CLEAN_VERSION=$(echo $VERSION | sed 's/v//g')
sed -i --regexp-extended 's/(Include="HoneybeeSchema" Version=").*(")/Include="HoneybeeSchema" Version="'"$CLEAN_VERSION"'"/' src/DragonflySchema/DragonflySchema.csproj
- name: "Commit and Push Changes"
id: push
env:
VERSION: ${{ github.event.client_payload.version }}
run: |
git config --global user.name 'ladybugbot'
git config --global user.email 'ladybugbot@users.noreply.github.com'
git add .
git commit -m "fix(deps): Bump honeybee-schema to $VERSION"
git push