Skip to content

Commit 6d8b0fd

Browse files
authored
Merge pull request #30 from PatternAtlas/feature/add-dockerhub-workflow
Add dockerhub workflow
2 parents 1af2123 + a378a46 commit 6d8b0fd

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/dockerhub.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Push docker images to Dockerhub
2+
3+
on:
4+
push:
5+
branches: master
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
multi:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v1
17+
- name: Set output
18+
id: vars
19+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v1
22+
- name: Login to DockerHub
23+
uses: docker/login-action@v1
24+
with:
25+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
26+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
27+
28+
- name: Build and push latest Pattern Atlas Api
29+
if: ${{ steps.vars.outputs.tag == 'master' }}
30+
uses: docker/build-push-action@v2
31+
with:
32+
context: .
33+
push: true
34+
tags: patternatlas/pattern-atlas-api:latest
35+
36+
- name: Build and push version of Pattern Atlas Api
37+
if: ${{ steps.vars.outputs.tag != 'master' }}
38+
uses: docker/build-push-action@v2
39+
with:
40+
context: .
41+
push: true
42+
tags: patternatlas/pattern-atlas-api:${{ steps.vars.outputs.tag }}

.github/workflows/maven.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Java CI with Maven
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up JDK 11
13+
uses: actions/setup-java@v1
14+
with:
15+
java-version: 11
16+
- name: Latex dependencies
17+
run: |
18+
sudo apt-get update && sudo apt-get install -y --no-install-recommends \
19+
texlive texlive-latex-extra texlive-luatex texlive-xetex texlive-lang-european -y
20+
- name: Build with Maven
21+
run: mvn -B package --file pom.xml

0 commit comments

Comments
 (0)