Skip to content

Commit 68ce02a

Browse files
author
Paul McCann
authored
Merge branch 'dev' into dependabot/maven/org.mockito-mockito-core-4.9.0
2 parents 738e2f2 + 8a99b51 commit 68ce02a

File tree

2 files changed

+12
-100
lines changed

2 files changed

+12
-100
lines changed

.github/workflows/dependency-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- cron: '0 0 1,15 * *'
77
push:
88
branches: [master, dev]
9-
paths-ignore:
10-
- '**.md'
9+
paths:
10+
- 'pom.xml'
1111
pull_request:
1212

1313
jobs:

.github/workflows/release.yml

Lines changed: 10 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Release to Dockerhub
2-
on:
2+
on:
33
pull_request:
44
types:
55
- closed
@@ -21,9 +21,10 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v2
2323
- name: Set up JDK 1.8
24-
uses: actions/setup-java@v1
24+
uses: actions/setup-java@v3.6.0
2525
with:
26-
java-version: 1.8
26+
distribution: 'zulu'
27+
java-version: '8'
2728
- name: Build Maven with Docker Profile and Generate SBOM
2829
run: mvn clean install -Pdocker -DskipTests -B -DexcludeTestProject=true cyclonedx:makeBom
2930
- name: Upload WAR File
@@ -70,7 +71,7 @@ jobs:
7071
docker/mariadb/target
7172
docker/mongo/target
7273
73-
release-webapp:
74+
release-security-shepherd:
7475
needs: build
7576
if: github.event.pull_request.merged == true
7677
runs-on: ubuntu-latest
@@ -79,14 +80,15 @@ jobs:
7980
uses: actions/checkout@v2
8081

8182
- name: Log in to Docker Hub
82-
uses: docker/login-action@v1
83+
uses: docker/login-action@v2.1.0
8384
with:
8485
username: ${{ secrets.DOCKERHUB_USERNAME }}
8586
password: ${{ secrets.DOCKERHUB_TOKEN }}
8687

88+
8789
- name: Extract metadata (tags, labels) for Docker
8890
id: meta
89-
uses: docker/metadata-action@v3
91+
uses: docker/metadata-action@v4.1.1
9092
with:
9193
images: owasp/security-shepherd
9294

@@ -106,7 +108,7 @@ jobs:
106108
env-file: .env
107109

108110
- name: Build and push Tomcat
109-
uses: docker/build-push-action@v2
111+
uses: docker/build-push-action@v3.2.0
110112
with:
111113
context: .
112114
push: true
@@ -117,94 +119,4 @@ jobs:
117119
TLS_KEYSTORE_FILE
118120
TLS_KEYSTORE_PASS
119121
ALIAS
120-
HTTPS_PORT
121-
122-
release-database:
123-
needs: build
124-
if: github.event.pull_request.merged == true
125-
runs-on: ubuntu-latest
126-
steps:
127-
- name: Checkout
128-
uses: actions/checkout@v2
129-
130-
- name: Log in to Docker Hub
131-
uses: docker/login-action@v1
132-
with:
133-
username: ${{ secrets.DOCKERHUB_USERNAME }}
134-
password: ${{ secrets.DOCKERHUB_TOKEN }}
135-
136-
- name: Extract metadata (tags, labels) for Docker
137-
id: meta
138-
uses: docker/metadata-action@v3
139-
with:
140-
images: owasp/security-shepherd_mariadb
141-
142-
- name: Restore Cached Maven packages
143-
uses: actions/cache@v3
144-
with:
145-
key: maven-output-${{ hashFiles('target/**') }}
146-
path: |
147-
target/
148-
docker/mariadb/target
149-
docker/mongo/target
150-
151-
- name: Set environment variables
152-
uses: c-py/action-dotenv-to-setenv@80f488cda311f44d43e687a4e94f54a050b7822a # v4
153-
with:
154-
env-file: .env
155-
156-
- name: Build and push MariaDb
157-
uses: docker/build-push-action@v2
158-
with:
159-
context: docker/mariadb/
160-
push: true
161-
tags: ${{ steps.meta.outputs.tags }}
162-
labels: ${{ steps.meta.outputs.labels }}
163-
build-args: |
164-
DB_VERSION
165-
DB_BIND_ADDRESS
166-
167-
release-mongodb:
168-
needs: build
169-
if: github.event.pull_request.merged == true
170-
runs-on: ubuntu-latest
171-
steps:
172-
- name: Checkout
173-
uses: actions/checkout@v2
174-
175-
- name: Log in to Docker Hub
176-
uses: docker/login-action@v1
177-
with:
178-
username: ${{ secrets.DOCKERHUB_USERNAME }}
179-
password: ${{ secrets.DOCKERHUB_TOKEN }}
180-
181-
- name: Extract metadata (tags, labels) for Docker
182-
id: meta
183-
uses: docker/metadata-action@v3
184-
with:
185-
images: owasp/security-shepherd_mongodb
186-
187-
- name: Restore Cached Maven packages
188-
uses: actions/cache@v3
189-
with:
190-
key: maven-output-${{ hashFiles('target/**') }}
191-
path: |
192-
target/
193-
docker/mariadb/target
194-
docker/mongo/target
195-
196-
- name: Set environment variables
197-
uses: c-py/action-dotenv-to-setenv@80f488cda311f44d43e687a4e94f54a050b7822a # v4
198-
with:
199-
env-file: .env
200-
201-
- name: Build and push MongoDb
202-
uses: docker/build-push-action@v2
203-
with:
204-
context: docker/mongo/
205-
push: true
206-
tags: ${{ steps.meta.outputs.tags }}
207-
labels: ${{ steps.meta.outputs.labels }}
208-
build-args: |
209-
MONGODB_VERSION
210-
MONGO_BIND_ADDRESS
122+
HTTPS_PORT

0 commit comments

Comments
 (0)