forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 31
58 lines (53 loc) · 1.5 KB
/
dev-pipeline.yml
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
50
51
52
53
54
55
56
57
58
name: Process dev-2.x push
on:
push:
branches:
- dev-2.x
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
- name: Run tests
run: |
mvn test -P prettierSkip
container-image:
runs-on: ubuntu-latest
needs:
- test
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: temurin
cache: maven
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Build container image with Jib, push to Dockerhub
env:
CONTAINER_REPO: docker.io/hsldevcom/opentripplanner:v2
CONTAINER_REGISTRY_USER: ${{ secrets.DOCKER_USER }}
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.DOCKER_AUTH }}
run: |
otp_version="v2"
commit_hash=`git rev-parse --short "$GITHUB_SHA"`
date_time=`date +"%Y-%m-%dT%H-%M-%S"`
docker_tag_long="$otp_version-$date_time-$commit_hash"
mvn --batch-mode -P prettierSkip install com.google.cloud.tools:jib-maven-plugin:build -Djib.to.tags=$docker_tag_long