-
Notifications
You must be signed in to change notification settings - Fork 411
46 lines (38 loc) · 1.11 KB
/
jdbc-driver.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
name: JDBC Driver Tests
on:
push:
branches: [ "master", "PG11" ]
pull_request:
branches: [ "master", "PG11" ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: drivers/jdbc
steps:
- uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Set tag based on branch
run: |
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "$GITHUB_REF" == "refs/heads/PG11" ]]; then
echo "TAG=PG11_latest" >> $GITHUB_ENV
fi
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "$GITHUB_BASE_REF" == "PG11" ]]; then
echo "TAG=PG11_latest" >> $GITHUB_ENV
fi
fi
- name: Build and Test
run: |
export TAG=$TAG
gradle build