-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (37 loc) · 1.18 KB
/
auto-commit-client-updates.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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Auto commit client updates
on:
workflow_dispatch:
push:
branches: [ "**" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: GitHub user
run: |
git config --global user.name 'equinix-labs@auto-commit-workflow'
git config --global user.email '[email protected]'
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Apply spec patches
id: patch
run: |
make patch
git add spec/oas3.patched
echo `git commit -m 'sync: apply patches to existing spec'`
- name: Generate code
id: generate
run: |
make generate
git add equinix-openapi-metal
echo `git commit -m 'sync: generate client with patched spec'`
- name: Push changes
run: |
echo `git push`