Skip to content

Nightly

Nightly #876

Workflow file for this run

name: Nightly
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
nightly:
if: github.repository == 'kiegroup/optaplanner-quickstarts'
concurrency:
group: nightly
cancel-in-progress: true
strategy:
matrix:
os: [ubuntu-latest]
java-version: [17]
fail-fast: true
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - Java ${{ matrix.java-version }} - Maven
steps:
- name: Support long paths
if: ${{ matrix.os == 'windows-latest' }}
uses: kiegroup/kie-ci/.ci/actions/long-paths@main
- name: Java and Maven Setup
uses: kiegroup/kie-ci/.ci/actions/maven@main
with:
java-version: ${{ matrix.java-version }}
maven-version: ${{ matrix.maven-version }}
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }}
- uses: actions/checkout@v3
- name: Build with Maven
run: mvn -B clean install --file pom.xml dependency:tree -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 -Dmaven.wagon.http.retryHandler.count=3
- name: Set build information
if: ${{ always() }}
run: |
echo "project_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "project_name=${{github.repository}}" >> $GITHUB_ENV
echo "action_url=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV
- name: Set failure message
if: ${{ failure() }}
run: echo "zulip_message=:cross_mark:Build ERROR. See ${{env.action_url}}" >> $GITHUB_ENV
- name: Set success message
if: ${{ success() }}
run: echo "zulip_message=:check:Build OK. See ${{env.action_url}}" >> $GITHUB_ENV
- name: Send a stream message
if: ${{ always() }}
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: ${{ secrets.ZULIP_EMAIL }}
organization-url: 'https://kie.zulipchat.com'
to: 'optaplanner-ci'
type: 'stream'
topic: 'status of ${{env.project_name}} - ${{env.project_branch}}'
content: ${{ env.zulip_message }}