Skip to content

Dockerize

Dockerize #4

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 the code
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Set up Java
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'temurin'
cache: gradle
# Step 3: Ensure necessary tools are installed (Gradle Wrapper check)
- name: Verify Gradle Wrapper
run: |
if [ ! -f "./gradlew" ]; then
echo "Gradle Wrapper not found. Generating it..."
gradle wrapper
fi
# Step 4: Clean and build the project
- name: Clean and build
run: ./gradlew clean build
# Step 5: Upload the WAR file as an artifact
- name: Upload WAR file
uses: actions/upload-artifact@v4
with:
name: irma_idin_server
path: build/libs/*.war