-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (33 loc) · 954 Bytes
/
CI.yaml
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
name: CI
on:
pull_request:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Get repo name
id: get_repo
run: echo ::set-output name=REPO::${GITHUB_REPOSITORY#*/}
- name: Setup Java 21
uses: actions/setup-java@v3.10.0
with:
distribution: 'adopt'
java-version: '21'
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.1.0
- name: Gradle Setup
uses: gradle/gradle-build-action@v2.8.0
with:
gradle-version: wrapper
arguments: build
- name: Trigger CD
if: github.ref == 'refs/heads/main'
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GITHUBACTION_TOKEN }}
repository: ${{ github.repository }}
event-type: trigger-cd