Skip to content

Update ci.yml

Update ci.yml #34

Workflow file for this run

name: CI
on:
push:
branches: [owlapi_fix, master]
tags:
- 'v*'
pull_request:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
maven:
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [11, 14, 17]
steps:
- uses: actions/checkout@v3
# details https://github.com/actions/setup-java
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: 'zulu'
cache: maven
- name: resolve
run: mvn dependency:resolve
- name: find
run: find / -name owlapi-distribution-5.1.18.jar
- name: Build with Maven
run: mvn compile
- name: Include JDK in filename
run: |
FN=$(ls JAR/*.jar)
mv ${FN} ${FN/.jar/_JDK-${{ matrix.jdk }}.jar}
- name: Upload JAR
uses: actions/upload-artifact@v3
with:
name: widoco_JDK-${{ matrix.jdk }}
path: JAR/*.jar
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/metadata-action (lower cases image name, etc.)
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push
uses: docker/[email protected]
with:
push: ${{ github.event_name != 'pull_request' && github.actor != 'dependabot[bot]' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}