Maven Build for Snapshot #1004
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: Maven Build for Snapshot | |
# Performs a Maven release using JDK 11 on a schedule | |
on: | |
release: | |
types: [ published ] | |
schedule: | |
- cron: '20 20 * * *' | |
jobs: | |
publish: | |
name: Maven Artifact Publisher (JDK ${{ matrix.java }} with ${{ matrix.build_property }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 17 ] | |
build_property: [ "kakadu.version", "ignored.version" ] | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v2 | |
- name: Install JDK ${{ matrix.java }} | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v1 | |
with: | |
distribution: "temurin" | |
java-version: ${{ matrix.java }} | |
cache: maven | |
- name: Optionally, set artifact qualifier (for private builds that include Kakadu) | |
if: matrix.build_property == 'kakadu.version' | |
run: echo "ARTIFACT_QUALIFIER=${{ secrets.ARTIFACT_QUALIFIER }}" >> $GITHUB_ENV | |
- name: Optionally, login to Docker repository | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0 | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
if: env.DOCKER_USERNAME != null | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Install Kakadu SSH key | |
uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0 | |
with: | |
ssh-private-key: ${{ secrets.KAKADU_PRIVATE_SSH_KEY }} | |
- name: Release with Maven | |
uses: samuelmeuli/action-maven-publish@201a45a3f311b2ee888f252ba9f4194257545709 # v1.4.0 | |
with: | |
gpg_private_key: ${{ secrets.BUILD_KEY }} | |
gpg_passphrase: ${{ secrets.BUILD_PASSPHRASE }} | |
nexus_username: ${{ secrets.SONATYPE_USERNAME }} # These are placeholders; we're publishing a Docker image | |
nexus_password: ${{ secrets.SONATYPE_PASSWORD }} | |
maven_args: > | |
-Drevision=nightly | |
-Dcantaloupe.version=dev | |
-Dcantaloupe.commit.ref=${{ vars.DEV_COMMIT_REF }} | |
-Dcantaloupe.apply.patchfiles=${{ secrets.APPLY_PATCHFILES }} | |
-ntp -DskipNexusStagingDeployMojo=true | |
-D${{ matrix.build_property }}=${{ secrets.KAKADU_VERSION }} | |
-Ddocker.image=${{ secrets.DOCKER_REGISTRY_ACCOUNT}}cantaloupe${{ env.ARTIFACT_QUALIFIER }}:nightly | |
-Ddocker.registry.username=${{ secrets.DOCKER_USERNAME }} | |
-Ddocker.registry.account=${{ secrets.DOCKER_REGISTRY_ACCOUNT}} | |
-Ddocker.registry.password=${{ secrets.DOCKER_PASSWORD }} |