Skip to content

Commit 5b9dbb1

Browse files
authored
Merge pull request #169 from abhijeetw035/bugfix/issue-56
fix: update GitHub Actions with correct Node.js, submodules, and working CI build
2 parents f3a4797 + 548a432 commit 5b9dbb1

16 files changed

+4758
-17562
lines changed

.github/workflows/build-on-pull-request.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,27 @@ jobs:
88
Build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- name: Checkout code
12-
uses: actions/checkout@v3
11+
- name: Checkout code with submodule
12+
uses: actions/checkout@v4
1313
with:
1414
ref: ${{ github.event.pull_request.head.ref }}
1515
repository: ${{ github.event.pull_request.head.repo.full_name }}
1616
submodules: true
1717
fetch-depth: 0
1818

1919
- name: Update submodules
20-
run: git submodule update --init --recursive
20+
run: |
21+
git submodule init
22+
git submodule update --recursive
2123
2224
- name: Setup JDK 17
23-
uses: actions/setup-java@v2
25+
uses: actions/setup-java@v4
2426
with:
2527
java-version: 17
2628
distribution: 'adopt'
2729

2830
- name: Set up Node.js
29-
uses: actions/setup-node@v2
31+
uses: actions/setup-node@v4
3032
with:
3133
node-version: 18
3234

@@ -35,7 +37,5 @@ jobs:
3537
npm config set legacy-peer-deps true
3638
npm install -g @angular/cli
3739
npm install [email protected] --save-dev
38-
npm install [email protected]
39-
npm install node-sass
4040
npm install --force
41-
npm run build
41+
npm run build-ci

.github/workflows/codeql.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
# Initializes the CodeQL tools for scanning.
5454
- name: Initialize CodeQL
55-
uses: github/codeql-action/init@v3
55+
uses: github/codeql-action/init@v4
5656
with:
5757
languages: ${{ matrix.language }}
5858
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -66,7 +66,7 @@ jobs:
6666
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
6767
# If this step fails, then you should remove it and run the build manually (see below)
6868
- name: Autobuild
69-
uses: github/codeql-action/autobuild@v3
69+
uses: github/codeql-action/autobuild@v4
7070

7171
# ℹ️ Command-line programs to run using the OS shell.
7272
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -79,6 +79,6 @@ jobs:
7979
# ./location_of_script_within_repo/buildscript.sh
8080

8181
- name: Perform CodeQL Analysis
82-
uses: github/codeql-action/analyze@v3
82+
uses: github/codeql-action/analyze@v4
8383
with:
8484
category: "/language:${{matrix.language}}"

.github/workflows/package-prod.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ jobs:
1616
steps:
1717

1818
- name: Checkout code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121

2222
- name: Set up Java
23-
uses: actions/setup-java@v3
23+
uses: actions/setup-java@v4
2424
with:
2525
java-version: '17'
2626
distribution: 'adopt'
2727

2828

2929
- name: Set up Node.js
30-
uses: actions/setup-node@v2
30+
uses: actions/setup-node@v4
3131
with:
3232
node-version: 18
3333

@@ -38,14 +38,12 @@ jobs:
3838
npm install -g @angular/cli
3939
npm install -g grunt-cli
4040
npm install [email protected] --save-dev
41-
npm install [email protected]
42-
npm install node-sass --force
4341
npm install --force
4442
ng build --configuration production
4543
4644
4745
- name: Upload WAR file as artifact
48-
uses: actions/upload-artifact@v2
46+
uses: actions/upload-artifact@v4
4947
with:
5048
name: MMU-UI
5149
path: dist/mmu-ui/mmu-ui.war

.github/workflows/package.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818

1919
- name: Checkout code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
submodules: true # Include submodules
2323
fetch-depth: 0 # Ensure the full history is fetched
@@ -26,13 +26,13 @@ jobs:
2626
run: git submodule update --init --recursive
2727

2828
- name: Set up Java
29-
uses: actions/setup-java@v3
29+
uses: actions/setup-java@v4
3030
with:
3131
java-version: '17'
3232
distribution: 'adopt'
3333

3434
- name: Set up Node.js
35-
uses: actions/setup-node@v2
35+
uses: actions/setup-node@v4
3636
with:
3737
node-version: 18
3838

@@ -41,16 +41,14 @@ jobs:
4141
npm config set legacy-peer-deps true
4242
npm install -g @angular/cli
4343
npm install [email protected] --save-dev
44-
npm install [email protected]
45-
npm install node-sass
4644
npm install --force
4745
npm run build
4846
4947
- name: Create WAR file
5048
run: jar -cvf mmu-ui.war -C dist .
5149

5250
- name: Upload WAR file as artifact
53-
uses: actions/upload-artifact@v2
51+
uses: actions/upload-artifact@v4
5452
with:
5553
name: MMU-UI
5654
path: mmu-ui.war

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ testem.log
4242
.DS_Store
4343
Thumbs.db
4444

45-
src/environments/environment.ts
45+
src/environments/environment.ts
46+
src/environments/environment.ci.ts

Common-UI

Submodule Common-UI updated 79 files

angular.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,27 @@
5050
}
5151
],
5252
"outputHashing": "all",
53-
"optimization": true
53+
"optimization": true,
54+
"fileReplacements": [
55+
{
56+
"replace": "src/environments/environment.ts",
57+
"with": "src/environments/environment.prod.ts"
58+
}
59+
]
5460
},
5561
"development": {
5662
"buildOptimizer": false,
5763
"optimization": false,
5864
"vendorChunk": true,
5965
"extractLicenses": false,
6066
"sourceMap": true,
61-
"namedChunks": true
67+
"namedChunks": true,
68+
"fileReplacements": [
69+
{
70+
"replace": "src/environments/environment.ts",
71+
"with": "src/environments/environment.local.ts"
72+
}
73+
]
6274
},
6375
"ci": {
6476
"budgets": [

0 commit comments

Comments
 (0)