Nightly and CICD Jobs #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly Jobs | |
on: | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' # Run at midnight every day | |
workflow_dispatch: | |
jobs: | |
infra: | |
name: "Infra Biceps Validation" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build Bicep for linting | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: az config set bicep.use_binary_from_path=false && az bicep build -f infra/main.bicep --stdout | |
- name: Run Microsoft Security DevOps Analysis | |
uses: microsoft/security-devops-action@v1 | |
id: msdo | |
continue-on-error: true | |
with: | |
tools: templateanalyzer | |
- name: Upload alerts to Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
if: github.repository == 'Azure-Samples/azure-search-openai-demo-java' | |
with: | |
sarif_file: ${{ steps.msdo.outputs.sarifFile }} | |
frontend: | |
name: "Front-end validation" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build React Frontend | |
run: | | |
echo "Building front-end and merge into Spring Boot static folder." | |
cd ./app/frontend | |
npm install | |
npm run build | |
backend: | |
name: "Backend validation" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java version | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'microsoft' | |
java-version: '17' | |
cache: 'maven' | |
- name: Build Spring Boot App | |
run: | | |
echo "Building Spring Boot app." | |
cd ./app/backend | |
./mvnw verify |