CI #3963
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
concurrency: | |
group: mailosaur-java | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ vars.LINUX }} | |
timeout-minutes: 10 | |
env: | |
MAILOSAUR_BASE_URL: https://mailosaur.com/ | |
MAILOSAUR_SMTP_HOST: mailosaur.net | |
MAILOSAUR_SMTP_PORT: 2525 | |
MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} | |
MAILOSAUR_SERVER: ${{ secrets.MAILOSAUR_SERVER }} | |
MAILOSAUR_VERIFIED_DOMAIN: ${{ secrets.MAILOSAUR_VERIFIED_DOMAIN }} | |
MAILOSAUR_PREVIEWS_SERVER: ${{ secrets.MAILOSAUR_PREVIEWS_SERVER }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ vars.JAVA_VERSION }} | |
distribution: temurin | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Notify on Failure | |
uses: skitionek/notify-microsoft-teams@master | |
if: ${{ failure() }} | |
with: | |
webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }} | |
needs: ${{ toJson(needs) }} | |
job: ${{ toJson(job) }} | |
overwrite: "{ title: `${workflow} failed for ${repository.name}` }" | |
build-next: | |
if: ${{ always() }} | |
needs: build | |
runs-on: ${{ vars.LINUX }} | |
timeout-minutes: 10 | |
env: | |
MAILOSAUR_BASE_URL: https://next.mailosaur.com/ | |
MAILOSAUR_SMTP_HOST: mailosaur.email | |
MAILOSAUR_SMTP_PORT: 2525 | |
MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} | |
MAILOSAUR_SERVER: ${{ secrets.MAILOSAUR_SERVER }} | |
MAILOSAUR_VERIFIED_DOMAIN: ${{ secrets.MAILOSAUR_VERIFIED_DOMAIN }} | |
MAILOSAUR_PREVIEWS_SERVER: ${{ secrets.MAILOSAUR_PREVIEWS_SERVER }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ vars.JAVA_VERSION }} | |
distribution: temurin | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Notify on Failure | |
uses: skitionek/notify-microsoft-teams@master | |
if: ${{ failure() }} | |
with: | |
webhook_url: ${{ secrets.TEAMS_BUILDS_WEBHOOK }} | |
needs: ${{ toJson(needs) }} | |
job: ${{ toJson(job) }} | |
overwrite: "{ title: `${workflow} failed for ${repository.name}` }" |