-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.19 KB
/
pre-merge.yaml
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
42
43
44
45
46
name: PreMerge
on:
pull_request: #Pre merge cycle, triggered when a PR is created or updated
permissions:
contents: read
jobs:
MavenBuild:
runs-on: [cumulocity-dependencies]
env:
WORKSPACE: "${{ github.workspace }}"
MVN_SETTINGS: "${{ github.workspace }}/settings.xml"
MAVEN_PROFILES: "?ci,?pre-merge"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get PR number
id: pr_number
uses: kamatama41/get-pr-number-action@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Configure Maven
run: |
echo '${{ secrets.MAVEN_DEVELOPER_SETTINGS }}' > $MVN_SETTINGS
- name: Configure version
run: |
.github/scripts/mvn.sh -N -q -Dexec.executable='echo' exec:exec \
-Dexec.args='VERSION=${revision}' >> "$GITHUB_ENV"
echo 'CHANGE_VERSION=.${{steps.pr_number.outputs.number}}.${{github.run_number}}.deps' >> "$GITHUB_ENV"
- name: Run Maven build
run: |
.github/scripts/mvn.sh install