Build and deploy #340
This file contains hidden or 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: Build and deploy | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'src/main/**' | |
| schedule: | |
| - cron: 0 */4 * * * | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: 'Log Level' | |
| required: false | |
| default: 'warning' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Create settings.xml | |
| run: | | |
| cat <<EOF > $GITHUB_WORKSPACE/settings.xml | |
| <settings> | |
| <servers> | |
| <server> | |
| <id>colddev-repo</id> | |
| <username>${{ secrets.NEXUS_USERNAME }}</username> | |
| <password>${{ secrets.NEXUS_PASSWORD }}</password> | |
| </server> | |
| </servers> | |
| </settings> | |
| EOF | |
| # Build the project using Maven | |
| - name: Build with Maven | |
| run: mvn package -s $GITHUB_WORKSPACE/settings.xml | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |