mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-22 00:38:54 +00:00
Refactor GitHub action
This commit is contained in:
parent
61cbf1d3e5
commit
a7789025eb
76
.github/workflows/main.yml
vendored
76
.github/workflows/main.yml
vendored
@ -2,7 +2,7 @@ name: Main
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -13,10 +13,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'adopt'
|
||||
java-version: '8'
|
||||
distribution: "adopt"
|
||||
java-version: "8"
|
||||
check-latest: true
|
||||
cache: 'maven'
|
||||
cache: "maven"
|
||||
|
||||
- name: build with maven
|
||||
run: mvn --batch-mode --define java.net.useSystemProxies=true package
|
||||
@ -37,6 +37,33 @@ jobs:
|
||||
tag: ${{ github.ref }}
|
||||
overwrite: true
|
||||
|
||||
- name: Docker tomcat meta
|
||||
id: docker_meta_tomcat
|
||||
uses: crazy-max/ghaction-docker-meta@v3
|
||||
with:
|
||||
flavor: |
|
||||
latest=false
|
||||
prefix=
|
||||
suffix=
|
||||
images: plantuml/plantuml-server
|
||||
tags: |
|
||||
type=semver,pattern=tomcat-{{raw}}
|
||||
type=raw,value=tomcat
|
||||
|
||||
- name: Docker jetty meta
|
||||
id: docker_meta_jetty
|
||||
uses: crazy-max/ghaction-docker-meta@v3
|
||||
with:
|
||||
flavor: |
|
||||
latest=true
|
||||
prefix=
|
||||
suffix=
|
||||
images: plantuml/plantuml-server
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
type=semver,pattern=jetty-{{raw}}
|
||||
type=raw,value=jetty
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
@ -49,37 +76,24 @@ jobs:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: build docker tagged images - jetty
|
||||
- name: Build & push tomcat
|
||||
id: docker_build_tomcat
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.tomcat
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plantuml-server:jetty-${{ steps.version.outputs.VERSION }}
|
||||
file: Dockerfile.jetty
|
||||
tags: ${{ steps.docker_meta_tomcat.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_tomcat.outputs.labels }}
|
||||
|
||||
- name: build docker latest images - jetty
|
||||
- name: Build & push jetty
|
||||
id: docker_build_jetty
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.jetty
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plantuml-server:jetty
|
||||
file: Dockerfile.jetty
|
||||
|
||||
- name: build docker tagged images - tomcat
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plantuml-server:tomcat-${{ steps.version.outputs.VERSION }}
|
||||
file: Dockerfile.tomcat
|
||||
|
||||
- name: build docker latest images - tomcat
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plantuml-server:tomcat
|
||||
file: Dockerfile.tomcat
|
||||
|
||||
- name: build docker latest images - jetty as latest
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plantuml-server:latest
|
||||
file: Dockerfile.jetty
|
||||
tags: ${{ steps.docker_meta_jetty.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta_jetty.outputs.labels }}
|
||||
|
Loading…
Reference in New Issue
Block a user