-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (69 loc) · 2.22 KB
/
ci.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
env:
DOCKER_IMAGE: ghcr.io/nordeck/jitsi-conference-mapper
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: maven
- name: Run Maven test phase
run: mvn --batch-mode --update-snapshots test
build:
runs-on: ubuntu-latest
timeout-minutes: 15
outputs:
docker-tag: ${{ steps.meta.outputs.version }}
needs: tests
steps:
- uses: actions/checkout@v3
with:
# required for changesets
fetch-depth: '0'
# don't persist the credentials so the changesets action doesn't use the
# github actions token but the git token provided via environment variable
persist-credentials: false
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGE_TOKEN }}
- name: Generate Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_IMAGE }}
labels: |
org.opencontainers.image.title=Jitsi Conference Mapper
org.opencontainers.image.description=A mapping application to map Jitsi conference names to PINs and vice versa
org.opencontainers.image.vendor=Nordeck IT + Consulting GmbH
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=pr,enable=true
type=ref,enable=true,priority=600,prefix=,suffix=,event=tag
- name: Setup buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64,linux/s390x
- name: Docker build and push
uses: docker/build-push-action@v3
id: dockerBuild
with:
push: true
context: .
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/s390x