-
Notifications
You must be signed in to change notification settings - Fork 20
49 lines (43 loc) · 1.21 KB
/
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
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
name: Build Status
# Step 1: Build on pull-requests or pushes to main
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
# Step 2: Build the samples
build-java:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
regex:
- "AdvancedExample"
- "BasicExample"
- "CloudVideoStitcherExample"
- "ExoPlayerExample"
- "SampleVideoPlayer"
- "PodServingExample"
steps:
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Clone Repo
uses: actions/checkout@v1
- name: Set commit range (push to the main branch, for example, merge)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: echo "COMMIT_RANGE="${{ github.event.before }}.."" >> $GITHUB_ENV
- name: Set commit range (pull request)
if: github.event_name == 'pull_request'
run: echo "COMMIT_RANGE="HEAD~.."" >> $GITHUB_ENV
- name: Build
run: .github/workflows/build/build.sh
shell: bash
env:
COMMIT_RANGE: ${{ env.COMMIT_RANGE }}
REGEX: ${{ matrix.regex }}