Skip to content

Commit adc9b67

Browse files
committed
chore(build): add github actions for PRs, pushes to master
1 parent a506994 commit adc9b67

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/build.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Branch Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
10+
11+
jobs:
12+
branch-build:
13+
# Only run this on repositories in the 'spinnaker' org, not on forks.
14+
if: startsWith(github.repository, 'spinnaker/')
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-java@v1
19+
with:
20+
java-version: 11
21+
- uses: actions/cache@v1
22+
with:
23+
path: ~/.gradle
24+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
25+
restore-keys: |
26+
${{ runner.os }}-gradle-
27+
- name: Build
28+
run: ./gradlew build --stacktrace

.github/workflows/pr.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PR Build
2+
3+
on: [ pull_request ]
4+
5+
env:
6+
GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx2g -Xms2g
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-java@v1
14+
with:
15+
java-version: 11
16+
- uses: actions/cache@v1
17+
with:
18+
path: ~/.gradle
19+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
20+
restore-keys: |
21+
${{ runner.os }}-gradle-
22+
- name: Build
23+
run: ./gradlew build

0 commit comments

Comments
 (0)