Skip to content

Commit 2596aa2

Browse files
authored
Merge pull request #512 from dgarijo/develop
Github actions set up by @renefritze
2 parents 4030829 + 72a0e7f commit 2596aa2

2 files changed

Lines changed: 63 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Update Github actions in workflows
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
6+
env:
7+
REGISTRY: ghcr.io
8+
IMAGE_NAME: ${{ github.repository }}
9+
10+
jobs:
11+
maven:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
jdk: [11, 14, 17]
16+
steps:
17+
- uses: actions/checkout@v3
18+
# details https://github.com/actions/setup-java
19+
- name: Set up JDK ${{ matrix.jdk }}
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: ${{ matrix.jdk }}
23+
distribution: 'zulu'
24+
cache: maven
25+
- name: Build with Maven
26+
run: mvn -e --batch-mode package
27+
- name: Upload JAR
28+
uses: actions/upload-artifact@v2
29+
with:
30+
name: widoco_JDK-${{ matrix.jdk }}
31+
path: JAR/*.jar
32+
docker:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Set up QEMU
36+
uses: docker/setup-qemu-action@v1
37+
- name: Set up Docker Buildx
38+
uses: docker/setup-buildx-action@v1
39+
- name: Login to GitHub Container Registry
40+
uses: docker/login-action@v1
41+
with:
42+
registry: ghcr.io
43+
username: ${{ github.actor }}
44+
password: ${{ secrets.GITHUB_TOKEN }}
45+
# https://github.com/docker/metadata-action (lower cases image name, etc.)
46+
- name: Extract Docker metadata
47+
id: meta
48+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
49+
with:
50+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
51+
- name: Build and push
52+
uses: docker/build-push-action@v2
53+
with:
54+
push: ${{ github.event_name != 'pull_request' }}
55+
tags: ${{ steps.meta.outputs.tags }}
56+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)