-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.32 KB
/
update-generated-content.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
50
name: update-generated-content
on:
push:
branches: [ master ]
paths:
- '.build/**'
workflow_dispatch:
concurrency:
group: update-generated-content
cancel-in-progress: false
jobs:
update-generated-content:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup Graphviz"
shell: bash
run: sudo apt -y install graphviz
- name: "Setup Java"
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- name: "Setup Gradle"
uses: gradle/gradle-build-action@v3
with:
gradle-version: wrapper
- name: "Setup Gradle Wrapper"
working-directory: .build
shell: bash
run: chmod +x gradlew
- name: "Generate Files"
working-directory: .build
shell: bash
run: ./gradlew --no-daemon generateFiles
- name: "Commit & Push Changes"
shell: bash
run: |
git config --global user.name "Botty"
git config --global user.email "noreply@slu-it.de"
git add diagrams/**
git add documents/**
git diff --quiet --exit-code --cached || {
git commit -m "updated generated files"
git push origin HEAD:${{ github.ref_name }}
}