1
0
mirror of https://github.com/octoleo/plantuml-server.git synced 2024-11-18 02:05:12 +00:00
plantuml-server/.github/workflows/main.yml

89 lines
2.6 KiB
YAML
Raw Normal View History

2021-09-10 16:52:41 +00:00
name: Main
on:
# push:
# branches:
# - master # should run docker-push when no pull request
# create: # should run docker-tag when it is a tag, and no pull request
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
check-latest: true
cache: 'maven'
- name: build with maven
run: mvn --batch-mode --define java.net.useSystemProxies=true package
- name: get tag name
id: version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/*/}
- name: create renamed build
run: cp target/plantuml.war target/plantuml-${{ steps.version.outputs.VERSION }}.war
- 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
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build docker tagged images - jetty
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/plantuml-server:jetty-${{ steps.version.outputs.VERSION }}
file: Dockerfile.jetty
- name: build docker latest images - jetty
uses: docker/build-push-action@v2
with:
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