-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.17 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Build
on:
push:
branches-ignore:
- development
- test
- master
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 15
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '15'
- name: Cache maven artifacts
uses: actions/cache@v4
env:
cache-name: cache-maven-artifacts
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.m2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Extract branch name
shell: bash
run: echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Build with Maven
run: ./deploy/build.sh unused ${{ env.BRANCH }}
env:
MDM_ENDPOINT: ${{ secrets.MDM_ENDPOINT }}
MDM_TASK_PASSWORD: ${{ secrets.MDM_TASK_PASSWORD }}
MDM_TASK_USER: ${{ secrets.MDM_TASK_USER }}
- name: Report build status via Slack
uses: act10ns/slack@v2
if: always()
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}