-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.26 KB
/
Copy pathpublish-web-tool.yml
File metadata and controls
48 lines (41 loc) · 1.26 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
44
45
46
47
48
name: Publish Web-Tool Docker Image
on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version to build Docker image for (example 1.0.0)'
required: true
default: '1.x.x'
permissions:
contents: read
jobs:
docker:
runs-on: ubuntu-latest
if: github.actor == 'flexca'
steps:
- name: Checkout released tag
uses: actions/checkout@v4
with:
ref: refs/tags/v${{ github.event.inputs.releaseVersion }}
fetch-depth: 0
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Build Web-Tool
run: mvn clean package -DskipTests
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./web-tool/Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/enot-web-tool:${{ github.event.inputs.releaseVersion }}
${{ secrets.DOCKERHUB_USERNAME }}/enot-web-tool:latest