Skip to content

Merge branch 'development' #18

Merge branch 'development'

Merge branch 'development' #18

name: build-push-dockerhub
on:
push:
branches:
- 'main'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Check out the codebase
uses: actions/checkout@v4
-
name: Get version from version file
run: |
VERSION=$(cat version)
echo "VERSION=$VERSION" >> $GITHUB_ENV
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and Export Database Container to Docker
uses: docker/build-push-action@v5
with:
context: .
file: ./database/Dockerfile
load: true
tags: webpwnized/mutillidae:database
-
name: Run Trivy vulnerability scanner on Database Container
uses: aquasecurity/trivy-action@master
with:
image-ref: 'webpwnized/mutillidae:database'
format: 'sarif'
output: 'database-trivy-results.sarif'
-
name: Upload Database Container Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'database-trivy-results.sarif'
-
name: Build and push database container
uses: docker/build-push-action@v5
with:
context: .
file: ./database/Dockerfile
push: true
tags: webpwnized/mutillidae:database
-
name: Build and push database container
uses: docker/build-push-action@v5
with:
context: .
file: ./database/Dockerfile
push: true
tags: webpwnized/mutillidae:database-${{ env.VERSION }}
-
name: Build and push database_admin container
uses: docker/build-push-action@v5
with:
context: .
file: ./database_admin/Dockerfile
push: true
tags: webpwnized/mutillidae:database_admin
-
name: Build and push database_admin container
uses: docker/build-push-action@v5
with:
context: .
file: ./database_admin/Dockerfile
push: true
tags: webpwnized/mutillidae:database_admin-${{ env.VERSION }}
-
name: Build and push ldap container
uses: docker/build-push-action@v5
with:
context: .
file: ./ldap/Dockerfile
push: true
tags: webpwnized/mutillidae:ldap
-
name: Build and push ldap container
uses: docker/build-push-action@v5
with:
context: .
file: ./ldap/Dockerfile
push: true
tags: webpwnized/mutillidae:ldap-${{ env.VERSION }}
-
name: Build and push ldap_admin container
uses: docker/build-push-action@v5
with:
context: .
file: ./ldap_admin/Dockerfile
push: true
tags: webpwnized/mutillidae:ldap_admin
-
name: Build and push ldap_admin container
uses: docker/build-push-action@v5
with:
context: .
file: ./ldap_admin/Dockerfile
push: true
tags: webpwnized/mutillidae:ldap_admin-${{ env.VERSION }}
-
name: Build and push www container
uses: docker/build-push-action@v5
with:
context: .
file: ./www/Dockerfile
push: true
tags: webpwnized/mutillidae:www
-
name: Build and push www container
uses: docker/build-push-action@v5
with:
context: .
file: ./www/Dockerfile
push: true
tags: webpwnized/mutillidae:www-${{ env.VERSION }}