-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 914 Bytes
/
dockerpublishmanual.yml
File metadata and controls
33 lines (31 loc) · 914 Bytes
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
name: Docker build and publish image manual
on:
workflow_dispatch:
inputs:
deploytarget:
description: 'deploytarget'
required: true
default: 'docker'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml -DskipTests=true
- name: Publish to Registry
env:
DOCKER_USER: ${{secrets.DOCKER_USERNAME}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build the Docker image
run: docker build -t wlanboy/javahttpclient:latest .
- name: Docker Push
run: docker push wlanboy/javahttpclient:latest