Skip to content

Commit 84fe9d1

Browse files
authored
Create dockerpublishmanual.yml
1 parent 9290023 commit 84fe9d1

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docker build and publish image manual
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up JDK
12+
uses: actions/setup-java@v4
13+
with:
14+
java-version: 21
15+
distribution: 'temurin'
16+
cache: maven
17+
- name: Build with Maven
18+
run: mvn -B package --file pom.xml -DskipTests=true
19+
- name: Publish to Registry
20+
env:
21+
DOCKER_USER: ${{secrets.DOCKER_USERNAME}}
22+
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
23+
run: |
24+
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
25+
- name: Build the Docker image
26+
run: docker build -t wlanboy/webshell:latest . --build-arg JAR_FILE=./target/webshell-0.1.2-SNAPSHOT.jar
27+
- name: Docker Push
28+
run: docker push wlanboy/webshell:latest

0 commit comments

Comments
 (0)