-
Notifications
You must be signed in to change notification settings - Fork 2
23 lines (22 loc) · 902 Bytes
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: Build indexer artifact and commit it
on:
workflow_dispatch:
push:
branches:
- main
jobs:
updateindex:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Build indexer artifact
run: cd indexer && ./gradlew clean build -i && cd ..
- name: Copy indexer artifact to destination folder
run: cp ./indexer/build/libs/indexer-1.0-SNAPSHOT.jar ./indexer-binary/indexer-1.0-SNAPSHOT.jar
- name: Commit indexer artifact
run: git config user.email "[email protected]" && git config user.name "Github Action" && git add indexer-binary/indexer-1.0-SNAPSHOT.jar && (git diff-index --quiet HEAD || (git commit --message="update indexer artifact" && git push origin main))