-
Notifications
You must be signed in to change notification settings - Fork 14
55 lines (43 loc) · 1.73 KB
/
geonetwork-docker.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
name: CI
on:
push:
branches:
- geocat_v4.2.3_*
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: "Checking out"
uses: actions/checkout@v2
with:
submodules: recursive
- name: "Setting up JDK 1.8"
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: "Cache Maven packages"
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: "Update maven dependencies"
run: mvn -Pdocker de.qaware.maven:go-offline-maven-plugin:resolve-dependencies
- name: Increase system limits
run: sudo sysctl -w vm.max_map_count=262144
- name: run tests
run: |
mvn resources:resources@copy-index-schema-to-source -f web
mvn clean verify -Pit
- name: "Installing"
run: mvn -B clean -DskipTests install -Ddb.username=db_username -Ddb.name=db_name -Ddb.type=postgres-postgis -Ddb.host=db_host -Ddb.password=db_password -Ddb.pool.maxActive=50 -Ddb.port=5432
- name: "Setting image tag"
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: "Building docker image"
run: mvn -pl web -Pdocker docker:build -DdockerImageName=docker.pkg.github.com/geoadmin/geocat/geocat_mgdi:${{ steps.version.outputs.VERSION }}-${{ github.run_number }}
- name: "Login to docker.pkg.github.com"
run: docker login -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} docker.pkg.github.com
- name: "Push to GitHub Packages"
run: docker push docker.pkg.github.com/geoadmin/geocat/geocat_mgdi:${{ steps.version.outputs.VERSION }}-${{ github.run_number }}