chore: build mds image #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ truzzt ] | |
release: | |
types: [ published ] | |
pull_request: | |
branches: [ truzzt ] | |
paths-ignore: | |
- '**.md' | |
- '**.png' | |
- 'docs/api/**' | |
- 'LICENSE' | |
env: | |
REGISTRY_URL: ghcr.io | |
REGISTRY_USER: ${{ github.actor }} | |
IMAGE_BASE_NAME: ${{ github.repository_owner }} | |
GITHUB_CI: true | |
jobs: | |
build-gradle-project: | |
name: Build Gradle Project | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: FranzDiebold/github-env-vars-action@v2 | |
- uses: actions/checkout@v3 | |
- name: "Set up JDK 17" | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: "Gradle: Validate Gradle Wrapper" | |
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 | |
- name: "Gradle: Include last commit info and build date for JARs" | |
run: | | |
git log -1 > extensions/last-commit-info/src/main/resources/jar-last-commit-info.txt | |
echo $(date --utc +%FT%TZ) > extensions/last-commit-info/src/main/resources/jar-build-date.txt | |
- name: "Gradle: Overwrite Artifact Version (Release Only)" | |
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
run: | | |
GRADLE_ARGS="-PsovityEdcExtensionsVersion=${GITHUB_REF#refs/tags/v}" | |
echo "GRADLE_ARGS=$GRADLE_ARGS" >> $GITHUB_ENV | |
- name: "Gradle: Build" | |
uses: gradle/[email protected] | |
with: | |
arguments: build ${{ env.GRADLE_ARGS }} | |
env: | |
USERNAME: ${{ github.actor }} | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Gradle: Publish (Main & Release Only)" | |
uses: gradle/[email protected] | |
if: ${{ github.ref == 'refs/heads/truzzt' || startsWith(github.ref, 'refs/tags/v') }} | |
with: | |
arguments: publish ${{ env.GRADLE_ARGS }} | |
env: | |
USERNAME: ${{ github.actor }} | |
TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Docker Image: edc-ce-mds" | |
uses: ./.github/actions/build-connector-image | |
with: | |
registry-url: ${{ env.REGISTRY_URL }} | |
registry-user: ${{ env.REGISTRY_USER }} | |
registry-password: ${{ secrets.GITHUB_TOKEN }} | |
image-base-name: ${{ env.IMAGE_BASE_NAME }} | |
image-name: "edc-ce-mds" | |
connector-name: "mds-ce" | |
title: "MDS Community Edition EDC Connector" | |
description: "EDC Connector built by sovity and configured for compatibility with the Mobility Data Space (MDS). This EDC requires dataspace credentials, and additional MDS Services such as a Clearing House." |