Skip to content

chore(deps): update actions/setup-java action to v4 #233

chore(deps): update actions/setup-java action to v4

chore(deps): update actions/setup-java action to v4 #233

Workflow file for this run

name: Main build
on:
pull_request:
push:
branches:
- master
- v4
workflow_dispatch:
inputs:
release:
description: Enable to trigger a release
type: boolean
required: true
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GH_TOKEN }}
- uses: tradeshift/setup-git-credentials@v2
with:
credentials: "https://tradeshiftcicomponents:${{ secrets.GH_TOKEN }}@github.com/"
- name: Fetch PR HEAD
if: contains(github.ref, 'pull')
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git checkout ${{ github.event.pull_request.head.sha }}
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- id: setupJava
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
- name: Set up Maven
uses: tradeshift/[email protected]
with:
maven-version: 3.6.3
- name: Configure maven
uses: tradeshift/actions-setup-java-mtls@v1
with:
java-version: "${{ steps.setupJava.outputs.version }}"
maven-settings: ${{ secrets.MAVEN_SETTINGS_GH_PG }}
maven-security: ${{ secrets.MAVEN_SECURITY }}
maven-p12: ${{ secrets.MAVEN_P12 }}
maven-p12-password: ${{ secrets.MAVEN_P12_PASSWORD }}
mtls-cacert: ${{ secrets.MTLS_CACERT }}
- name: Compile
run: |
mvn -B compile
- name: Test
run: |
mvn -B test
- name: Junit report
if: always()
uses: tradeshift/actions-junit-report@v3
with:
report_paths: 'target/surefire-reports/**/*.xml'
- name: SonarQube Scan
uses: tradeshift/actions-sonarqube@v2
with:
scanner: maven
ca-cert: ${{ secrets.MTLS_CACERT }}
client-cert: ${{ secrets.MTLS_CERT }}
client-key: ${{ secrets.MTLS_KEY }}
token: ${{ secrets.SONAR_TOKEN }}