forked from urlaubsverwaltung/urlaubsverwaltung
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (88 loc) · 3.04 KB
/
release.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Release
on:
push:
tags:
- 'urlaubsverwaltung*'
env:
MAVEN_ARGS: "--no-transfer-progress --errors --fail-at-end --show-version"
jobs:
create-github-release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '21'
cache: 'maven'
- name: Build jar with Maven
run: ./mvnw clean package
- name: Extract release version
id: vars
run: echo "version=${GITHUB_REF#refs/*/urlaubsverwaltung-}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release Urlaubsverwaltung ${{ steps.vars.outputs.version }}
body_path: .chglog/${{ steps.vars.outputs.version }}.md
files: |
./target/urlaubsverwaltung-*.jar
container-upload-github:
needs:
- create-github-release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '21'
cache: 'maven'
- name: Publish docker image to GitHub Container Registry
run: >
./mvnw spring-boot:build-image
-Dspring-boot.build-image.publish=true
-Ddocker-publish-registry=ghcr.io
-Ddocker-publish-registry-path=${{ github.repository }}
-Ddocker-publish-registry-username=${{ github.actor }}
-Ddocker-publish-registry-password=${{ secrets.GITHUB_TOKEN }}
container-upload-docker-hub-urlaubsverwaltung:
needs:
- create-github-release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '21'
cache: 'maven'
- name: Publish docker image to Docker Hub urlaubsverwaltung
run: >
./mvnw spring-boot:build-image
-Dspring-boot.build-image.publish=true
-Ddocker-publish-registry=registry.hub.docker.com
-Ddocker-publish-registry-path=urlaubsverwaltung
-Ddocker-publish-registry-username=${{ secrets.DOCKER_UV_USERNAME }}
-Ddocker-publish-registry-password=${{ secrets.DOCKER_UV_TOKEN }}
container-upload-docker-hub-synyx:
needs:
- create-github-release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '21'
cache: 'maven'
- name: Publish docker image to Docker Hub synyx
run: >
./mvnw spring-boot:build-image
-Dspring-boot.build-image.publish=true
-Ddocker-publish-registry=registry.hub.docker.com
-Ddocker-publish-registry-path=synyx
-Ddocker-publish-registry-username=${{ secrets.DOCKER_USERNAME }}
-Ddocker-publish-registry-password=${{ secrets.DOCKER_PASSWORD }}