Skip to content

Merge pull request #386 from keeps/cafonso-dev #40

Merge pull request #386 from keeps/cafonso-dev

Merge pull request #386 from keeps/cafonso-dev #40

Workflow file for this run

name: Latest
on:
push:
branches:
- "master"
jobs:
deploy:
runs-on: ubuntu-latest
env:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: 'master'
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'adopt'
- name: Cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Set POM version to staging
run: mvn $MAVEN_CLI_OPTS versions:set -DnewVersion=latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Package
run: mvn $MAVEN_CLI_OPTS clean package -Dmaven.test.skip=true -Pdefault
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: artifact
path: target/dbvtk-latest.war
retention-days: 1
dispatch:
needs: deploy
strategy:
matrix:
repo: [ 'keeps/dbptk-enterprise' ]
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: ${{ matrix.repo }}
event-type: dispatch-latest