-
Notifications
You must be signed in to change notification settings - Fork 30
48 lines (37 loc) · 1.24 KB
/
update.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
on:
push:
paths:
- 'api-specs/**'
workflow_dispatch:
name: Update RAML
permissions:
contents: write # for stefanzweifel/git-auto-commit-action to push code in repo
jobs:
generate:
name: "Update RAML spec"
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- "7.4"
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Install Java"
uses: actions/setup-java@v1
with:
java-version: '13'
- run: sudo chmod 777 /usr/local/bin && make generate lint
if: github.ref != 'refs/heads/main'
- run: sudo chmod 777 /usr/local/bin && make build
if: github.ref == 'refs/heads/main'
- name: "check pending changes"
run: echo "CHANGES_PENDING=`git status --porcelain -- ':(exclude)*gen.properties' | grep -c ^`" >> $GITHUB_ENV
- uses: stefanzweifel/git-auto-commit-action@v4
if: env.CHANGES_PENDING != '0'
with:
commit_message: "TASK: Updating RAML types, Postman and OAS definition"
file_pattern: oas uml
commit_user_name: Auto Mation
commit_user_email: [email protected]
commit_author: Auto Mation <[email protected]>