-
Notifications
You must be signed in to change notification settings - Fork 30
90 lines (77 loc) · 2.31 KB
/
downstream.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Test downstream projects
on:
push:
branches:
- "main"
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
pull_request:
paths-ignore:
- '.gitignore'
- 'CODEOWNERS'
- 'LICENSE'
- '*.md'
- '*.adoc'
- '*.txt'
- '.all-contributorsrc'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- {
organization: "quarkusio",
repository: "quarkus-github-bot"
}
- {
organization: "hibernate",
repository: "hibernate-github-bot"
}
- {
organization: "quarkusio",
repository: "quarkus-github-lottery"
}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-repo-pr-downstream-${{ runner.os }}-${{ steps.get-date.outputs.date }}
- name: Build quarkus-github-app
run: mvn -B install --file pom.xml -DskipTests
- name: Get project version
id: get-version
run: |
echo "::set-output name=version::$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version -q -DforceStdout)"
shell: bash
- uses: actions/checkout@v4
with:
repository: ${{ matrix.project.organization }}/${{ matrix.project.repository }}
path: ${{ matrix.project.repository }}
- name: Update quarkus-github-app version in ${{ matrix.project.repository }}
run: mvn -B versions:set-property -Dproperty=quarkus-github-app.version -DnewVersion=${{ steps.get-version.outputs.version }}
working-directory: ${{ matrix.project.repository }}
- name: Run ${{ matrix.project.repository }} tests
run: mvn -B install
working-directory: ${{ matrix.project.repository }}