Skip to content

Dockerize

Dockerize #7

Workflow file for this run

# Workflow to check whether changes to master fulfill all requirements.
name: Status checks
on:
push:
branches: [ master ]
pull_request:
schedule:
# Run every monday on 9:00 in the morning (UTC).
- cron: "0 9 * * 1"
# Make it possible to trigger the checks manually.
workflow_dispatch:
jobs:
analyze:
needs: build-war
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
java-version: '8'
distribution: temurin
cache: gradle
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: java
queries: security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:java"
build-war:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout repository
- name: Checkout code
uses: actions/checkout@v4
# Step 2: Build the Docker image for Java/Gradle (stop at javabuild step)
- name: Build Docker image
run: docker build --target javabuild -t war-builder .
# Step 3: Run the container and extract the WAR file
- name: Extract WAR file
run: |
mkdir -p artifacts
docker run --rm -v ${{ github.workspace }}/artifacts:/app/artifacts idin-issuer-javabuild \
bash -c "cp /app/build/libs/*.war /app/artifacts"
# Step 4: Upload the WAR file as an artifact
- name: Upload WAR file
uses: actions/upload-artifact@v4
with:
name: irma_idin_server
path: artifacts/irma_idin_server.war