1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-06-02 08:30:48 +00:00
plantuml-server/.github/workflows/main.yml

102 lines
2.8 KiB
YAML
Raw Normal View History

2021-09-10 16:52:41 +00:00
name: Main
2021-09-10 16:52:41 +00:00
on:
2021-09-10 21:51:13 +00:00
push:
tags:
2021-09-17 16:42:25 +00:00
- "v*"
2021-09-10 16:52:41 +00:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2021-09-17 16:42:25 +00:00
- uses: actions/checkout@v2
with:
fetch-depth: 0
2021-09-17 16:42:25 +00:00
- uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: "8"
check-latest: true
cache: "maven"
2021-09-10 16:52:41 +00:00
2021-09-17 16:42:25 +00:00
- name: build with maven
run: mvn --batch-mode --define java.net.useSystemProxies=true package
2021-09-10 16:52:41 +00:00
2021-09-17 16:42:25 +00:00
- name: get tag name
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
2021-09-10 16:52:41 +00:00
2021-09-17 16:42:25 +00:00
- name: create renamed build
run: cp target/plantuml.war target/plantuml-${{ steps.version.outputs.VERSION }}.war
2021-09-10 16:52:41 +00:00
2021-09-17 16:42:25 +00:00
- name: upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/plantuml-${{ steps.version.outputs.VERSION }}.war
asset_name: plantuml-${{ steps.version.outputs.VERSION }}.war
tag: ${{ github.ref }}
overwrite: true
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- 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
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- 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
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- 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: ${{ steps.docker_meta_tomcat.outputs.tags }}
labels: ${{ steps.docker_meta_tomcat.outputs.labels }}
2021-09-10 17:39:14 +00:00
2021-09-17 16:42:25 +00:00
- 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: ${{ steps.docker_meta_jetty.outputs.tags }}
labels: ${{ steps.docker_meta_jetty.outputs.labels }}