forked from artipie/artipie
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (35 loc) · 1.15 KB
/
docker-ubuntu-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
name: Release ubuntu-based Docker image
on:
push:
tags:
- "v*"
jobs:
docker-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 21
distribution: adopt
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-jdk-21-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-jdk-21-maven-
runs-on: ubuntu-latest
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- run: mvn versions:set -DnewVersion=${{ env.RELEASE_VERSION }}
- run: mvn install -DskipTests
- run: mvn -B deploy -Pubuntu-docker -DskipTests
working-directory: artipie-main
- run: mvn versions:set -DnewVersion=latest
- run: mvn install -DskipTests
- run: mvn -B deploy -Pubuntu-docker -DskipTests
working-directory: artipie-main