Skip to content

Commit 628b1ea

Browse files
authored
Merge branch 'master' into copilot/fix-2130
2 parents a8e2a4f + 6151d40 commit 628b1ea

35 files changed

+363
-95
lines changed

.github/scripts/docker-create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ test() {
460460
log_failure "The container test has failed, this means that when we built your changes and ran a basic sanity test on the homepage it failed. Please build the container locally and double check the container is running correctly."
461461
fi
462462
echo "testing curl for webjar caching"
463-
curl -I 'http://localhost:8080/webjars/bootstrap/5.3.7/css/bootstrap.min.css'
463+
curl -I 'http://localhost:8080/webjars/bootstrap/5.3.8/css/bootstrap.min.css'
464464
echo "testing with cypress (requires node20)"
465465
cd ../../src/test/e2e
466466
npx cypress run

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
uses: actions/setup-java@v5
7070
with:
7171
java-version: "23"
72-
distribution: "oracle"
72+
distribution: "temurin"
7373
- name: run mvn clean package
7474
run: ./mvnw clean package -Ddependency-check.skip=true -Dmaven.test.skip=true
7575
- name: Perform CodeQL Analysis

.github/workflows/container_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/setup-java@v5
2424
with:
2525
java-version: "23"
26-
distribution: "oracle"
26+
distribution: "temurin"
2727
cache: "maven"
2828
- name: Navigate to test script and run
2929
run: cd .github/scripts && bash docker-create.sh -t

.github/workflows/dast-zap-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/setup-java@v5
1919
with:
2020
java-version: "23"
21-
distribution: "oracle"
21+
distribution: "temurin"
2222
- name: Clean install
2323
run: ./mvnw --no-transfer-progress clean install -DskipTests -Ddependency-check.skip -Dcyclonedx.skip=true -Dexec.skip
2424
- name: Start wrongsecrets
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: Build and Publish Desktop Containers
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
packages: write
12+
13+
jobs:
14+
build-and-publish-desktop:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
container:
19+
- name: "webdesktop"
20+
dockerfile: "Dockerfile_webdesktop"
21+
image_name: "wrongsecrets-desktop"
22+
- name: "webdesktop-k8s"
23+
dockerfile: "Dockerfile_webdesktopk8s"
24+
image_name: "wrongsecrets-desktop-k8s"
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v5
28+
29+
- name: Set up JDK 23
30+
uses: actions/setup-java@v5
31+
with:
32+
java-version: "23"
33+
distribution: "temurin"
34+
cache: "maven"
35+
36+
- name: Extract version from pom.xml
37+
id: extract-version
38+
run: |
39+
echo "Extracting version from pom.xml..."
40+
chmod +x ./mvnw
41+
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
42+
DOCKER_VERSION=${VERSION%-SNAPSHOT}
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
45+
echo "Detected version: $VERSION"
46+
echo "Docker version: $DOCKER_VERSION"
47+
48+
- name: Build application
49+
run: ./mvnw --no-transfer-progress clean package -DskipTests
50+
51+
- name: Verify JAR file was created
52+
run: |
53+
echo "Checking target directory..."
54+
ls -la target/
55+
echo "Looking for JAR files..."
56+
find target/ -name "*.jar" -type f
57+
echo "Verifying specific JAR exists..."
58+
JAR_FILE="target/wrongsecrets-${{ steps.extract-version.outputs.version }}.jar"
59+
if [ -f "$JAR_FILE" ]; then
60+
echo "✅ JAR file found: $JAR_FILE"
61+
ls -la "$JAR_FILE"
62+
else
63+
echo "❌ Expected JAR file not found: $JAR_FILE"
64+
echo "Available JAR files:"
65+
find target/ -name "*.jar" -type f || echo "No JAR files found"
66+
exit 1
67+
fi
68+
69+
- name: Set up Docker Buildx
70+
uses: docker/setup-buildx-action@v3
71+
72+
- name: Log in to GitHub Container Registry
73+
uses: docker/login-action@v3
74+
with:
75+
registry: ghcr.io
76+
username: ${{ github.actor }}
77+
password: ${{ secrets.GITHUB_TOKEN }}
78+
79+
- name: Extract metadata
80+
id: meta
81+
uses: docker/metadata-action@v5
82+
with:
83+
images: ghcr.io/${{ github.repository }}/${{ matrix.image_name }}
84+
tags: |
85+
type=ref,event=branch
86+
type=raw,value=latest-master
87+
type=sha,prefix={{branch}}-
88+
89+
- name: Create secret file for build
90+
run: |
91+
echo "wrongsecret-3" > /tmp/mysecret.txt
92+
93+
- name: Build and push Docker image
94+
id: build
95+
uses: docker/build-push-action@v6
96+
with:
97+
platforms: linux/amd64,linux/arm64
98+
context: .
99+
file: ${{ matrix.dockerfile }}
100+
push: true
101+
tags: ${{ steps.meta.outputs.tags }}
102+
labels: ${{ steps.meta.outputs.labels }}
103+
build-args: |
104+
argBasedVersion=${{ steps.extract-version.outputs.docker_version }}
105+
secrets: |
106+
mysecret=/tmp/mysecret.txt
107+
cache-from: type=gha,scope=${{ matrix.name }}
108+
cache-to: type=gha,mode=max,scope=${{ matrix.name }}
109+
110+
- name: Verify Docker image was built
111+
run: |
112+
echo "Verifying Docker image was built successfully..."
113+
echo "Container: ${{ matrix.name }}"
114+
echo "Dockerfile: ${{ matrix.dockerfile }}"
115+
echo "Image tags: ${{ steps.meta.outputs.tags }}"
116+
echo "Image digest: ${{ steps.build.outputs.digest }}"
117+
118+
create-summary:
119+
runs-on: ubuntu-latest
120+
needs: build-and-publish-desktop
121+
steps:
122+
- name: Create Release Summary
123+
run: |
124+
echo "## 🖥️ Desktop Containers Published" >> $GITHUB_STEP_SUMMARY
125+
echo "" >> $GITHUB_STEP_SUMMARY
126+
echo "**📦 Container Images Published:**" >> $GITHUB_STEP_SUMMARY
127+
echo "" >> $GITHUB_STEP_SUMMARY
128+
echo "- \`ghcr.io/${{ github.repository }}/wrongsecrets-desktop:latest-master\`" >> $GITHUB_STEP_SUMMARY
129+
echo "- \`ghcr.io/${{ github.repository }}/wrongsecrets-desktop-k8s:latest-master\`" >> $GITHUB_STEP_SUMMARY
130+
echo "" >> $GITHUB_STEP_SUMMARY
131+
echo "**🐳 Try the desktop environments:**" >> $GITHUB_STEP_SUMMARY
132+
echo "" >> $GITHUB_STEP_SUMMARY
133+
echo "**Standard Desktop:**" >> $GITHUB_STEP_SUMMARY
134+
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
135+
echo "docker pull ghcr.io/${{ github.repository }}/wrongsecrets-desktop:latest-master" >> $GITHUB_STEP_SUMMARY
136+
echo "docker run -d -p 3000:3000 ghcr.io/${{ github.repository }}/wrongsecrets-desktop:latest-master" >> $GITHUB_STEP_SUMMARY
137+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
138+
echo "" >> $GITHUB_STEP_SUMMARY
139+
echo "**Kubernetes Desktop:**" >> $GITHUB_STEP_SUMMARY
140+
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
141+
echo "docker pull ghcr.io/${{ github.repository }}/wrongsecrets-desktop-k8s:latest-master" >> $GITHUB_STEP_SUMMARY
142+
echo "docker run -d -p 3000:3000 ghcr.io/${{ github.repository }}/wrongsecrets-desktop-k8s:latest-master" >> $GITHUB_STEP_SUMMARY
143+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
144+
echo "" >> $GITHUB_STEP_SUMMARY
145+
echo "Then visit: http://localhost:3000" >> $GITHUB_STEP_SUMMARY

.github/workflows/github-pages-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
uses: actions/setup-java@v5
3838
with:
3939
java-version: "23"
40-
distribution: "oracle"
40+
distribution: "temurin"
4141
cache: "maven"
4242

4343
- name: Build application (JAR only)

.github/workflows/java_swagger_doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: actions/setup-java@v5
1919
with:
2020
java-version: "23"
21-
distribution: "oracle"
21+
distribution: "temurin"
2222
- name: Clean install
2323
run: ./mvnw --no-transfer-progress clean install -DskipTests -Ddependency-check.skip -Dcyclonedx.skip=true -Dexec.skip
2424
- name: Compile javadoc

.github/workflows/link_checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
- name: Link Checker
2020
id: lychee
21-
uses: lycheeverse/[email protected].0
21+
uses: lycheeverse/[email protected].1
2222
with:
2323
args: --exclude-all-private --exclude-path "src/main/resources/templates/about.html" --exclude-path ".lycheeignore" -r 2 './**/*.md' './**/*.html'
2424
fail: true

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/setup-java@v5
3030
with:
3131
java-version: "23"
32-
distribution: "oracle"
32+
distribution: "temurin"
3333
cache: "maven"
3434
- name: checkstyle with Maven
3535
run: ./mvnw --no-transfer-progress checkstyle:check
@@ -43,7 +43,7 @@ jobs:
4343
uses: actions/setup-java@v5
4444
with:
4545
java-version: "23"
46-
distribution: "oracle"
46+
distribution: "temurin"
4747
cache: "maven"
4848
- name: spotbugs with Maven
4949
run: ./mvnw --no-transfer-progress package -DskipTests spotbugs:check
@@ -59,7 +59,7 @@ jobs:
5959
uses: actions/setup-java@v5
6060
with:
6161
java-version: "23"
62-
distribution: "oracle"
62+
distribution: "temurin"
6363
cache: "maven"
6464
- name: Test with Maven
6565
run: ./mvnw --no-transfer-progress test

.github/workflows/master-container-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
uses: actions/setup-java@v5
2222
with:
2323
java-version: "23"
24-
distribution: "oracle"
24+
distribution: "temurin"
2525
cache: "maven"
2626

2727
- name: Extract version from pom.xml

0 commit comments

Comments
 (0)