mirror of
https://github.com/valitydev/java-workflow.git
synced 2024-11-06 01:25:18 +00:00
02f0c461ae
return test coverate action on service deploy bump codecov
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
name: Maven Deploy Package
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
java-version:
|
|
description: 'Java version'
|
|
required: false
|
|
default: "15"
|
|
type: string
|
|
java-distribution:
|
|
description: 'Java distribution'
|
|
required: false
|
|
default: "adopt"
|
|
type: string
|
|
secrets:
|
|
server-username:
|
|
required: true
|
|
server-password:
|
|
required: true
|
|
deploy-secret-key:
|
|
required: true
|
|
deploy-secret-key-password:
|
|
required: true
|
|
mm-webhook-url:
|
|
required: true
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Deploy package
|
|
uses: valitydev/action-deploy-jdk-package@v1.0.14
|
|
with:
|
|
server-username: ${{ secrets.server-username }}
|
|
server-password: ${{ secrets.server-password }}
|
|
deploy-secret-key: ${{ secrets.deploy-secret-key }}
|
|
deploy-secret-key-password: ${{ secrets.deploy-secret-key-password }}
|
|
|
|
- name: Mattermost Notification
|
|
if: always()
|
|
uses: rtCamp/action-slack-notify@v2.2.0
|
|
env:
|
|
SLACK_USERNAME: ${{ github.event.repository.name }}
|
|
SLACK_WEBHOOK: ${{ secrets.mm-webhook-url }}
|
|
SLACK_COLOR: ${{ job.status }}
|
|
SLACK_LINK_NAMES: true
|
|
SLACK_FOOTER: ""
|
|
|
|
test-coverage:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
java-version: ${{ inputs.java-version }}
|
|
distribution: ${{ inputs.java-distribution }}
|
|
cache: 'maven'
|
|
|
|
- name: Maven Verify
|
|
run: mvn --batch-mode clean verify
|
|
|
|
- name: Upload code coverage
|
|
uses: codecov/codecov-action@v2 |