Skip to content

chore:Update production.yml #14

chore:Update production.yml

chore:Update production.yml #14

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Development-CI/CD
on:
push:
branches: [ "development" ]
pull_request:
branches: [ "development" ]
jobs:
build:
runs-on: self-hosted
steps:
# Checkout the code from the repository
- uses: actions/checkout@v4
# Set up Java JDK 21 with Maven dependency caching
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
# Cache Maven dependencies
- name: Cache Maven dependencies
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Navigate to assignment folder and build with Maven
- name: Build with Maven
run: |
cd "Example demo/assignment" # Navigate to the assignment directory
mvn -B package --file pom.xml # Run Maven with pom.xml