-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (80 loc) · 2.43 KB
/
Copy pathci.yml
File metadata and controls
96 lines (80 loc) · 2.43 KB
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
90
91
92
93
94
95
96
name: Identity CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: identity-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-theme:
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 30
steps:
- uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7
with:
node-version: 20
cache: npm
- name: Use pre-installed Temurin JDK 17
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> "$GITHUB_ENV"
- name: Install Maven
run: |
if ! command -v mvn >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y maven
fi
mvn -version
- name: Install dependencies reproducibly
id: install
run: |
set -o pipefail
npm ci 2>&1 | tee ci-install.log
- name: Sync Keycloakify extensions
id: sync
run: |
set -o pipefail
npm run prepare:extensions 2>&1 | tee ci-sync.log
- name: Typecheck and web build
id: check
run: |
set -o pipefail
npm run check 2>&1 | tee ci-check.log
- name: Build Keycloak theme
id: theme
run: |
set -o pipefail
npm run build:keycloak 2>&1 | tee ci-theme.log
- name: Verify extension overrides after Keycloak build
run: npm run verify:extensions
- name: Verify expected Keycloak build outputs
run: |
test -s dist_keycloak/keycloak-theme-for-kc-22-to-25.jar
test -s dist_keycloak/keycloak-theme-for-kc-all-other-versions.jar
find dist_keycloak -maxdepth 2 -type f -print
- name: Validate production Docker image
id: docker
run: |
set -o pipefail
docker build --pull -t corelink-identity:ci . 2>&1 | tee ci-docker.log
- name: Upload diagnostics
if: always()
uses: actions/upload-artifact@v7.0.1
with:
name: identity-ci-diagnostics
path: |
ci-install.log
ci-sync.log
ci-check.log
ci-theme.log
ci-docker.log
if-no-files-found: ignore
- name: Upload theme JAR
if: success()
uses: actions/upload-artifact@v7.0.1
with:
name: corelink-keycloak-theme
path: dist_keycloak/*.jar
if-no-files-found: error