-
Notifications
You must be signed in to change notification settings - Fork 3k
60 lines (52 loc) · 1.81 KB
/
generate-v3.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
51
52
53
54
55
56
57
58
59
60
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Generate V3 Samples
on:
push:
branches: [ main ]
repository_dispatch:
types: [ generate-v3 ]
jobs:
generate-v3:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Install NDK
run: |
sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;20.0.5594570"
- name: Generate V3
id: gradlew-generate-v3
run: |
cd ApiDemos/java
./gradlew generateV3 generateV3Layout
cd ../kotlin
./gradlew generateV3 generateV3Layout
echo "::set-output name=files-changed::$(git status -s | wc -l)"
- name: PR Changes
uses: peter-evans/create-pull-request@v2
if: steps.gradlew-generate-v3.outputs.files-changed > 0
with:
token: ${{ secrets.SYNCED_GITHUB_TOKEN_REPO }}
commit-message: 'chore: Generate V3 samples'
committer: googlemaps-bot <[email protected]>
author: googlemaps-bot <[email protected]>
title: 'chore: Generate V3 samples'
body: |
Generating V3 code via `./gradlew generateV3 generateV3Layout`
branch: googlemaps-bot/generate-v3