-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.15 KB
/
release-tag.yml
File metadata and controls
43 lines (39 loc) · 1.15 KB
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
name: Release tag
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
build-and-publish-container-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '16'
- run: >-
mvn
versions:set -DnewVersion=$( git describe --tags --exact-match --abbrev=0 )
versions:commit
--no-transfer-progress
- name: Test
run: mvn test --no-transfer-progress
- name: Log in to GitHub Packages container registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and publish container image
run: >-
mvn
jib:build
--no-transfer-progress
-Dcontainer-image.tag=$( git describe --tags --exact-match --abbrev=0 )
- name: Build and publish container image as latest
run: >-
mvn
jib:build
--no-transfer-progress
-Dcontainer-image.tag=latest