-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.45 KB
/
Maven_Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build App and Slack Connection
on:
push:
branches: [ master,test,staging ]
pull_request:
branches: [ master,test,staging ]
jobs:
build:
name : Build Project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Java Setup
uses: actions/setup-java@v1
with:
java-version: "11"
architecture: x64
- name: Build with Maven
run: |
java -version
echo $GOOGLE_APP_CREDENTIALS > ./google-credentials.json
mvn -B package --file pom.xml
env:
GOOGLE_APP_CREDENTIALS: ${{ secrets.GOOGLE_APP_CREDENTIALS }}
shell: bash
slack:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Current time for persitent
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
# this is for slack channel connectivity
- name: Notify slack
env:
SLACK_BOT_TOKEN: ${{ secrets.BOT_TOKEN_KEY }}
#run: echo "$CurrentValue and $NameOfApplication $GIT_ACTOR"
uses: pullreminders/slack-action@master
with:
args: '{\"channel\":\"CT39SRCN7\",\"text\":\"PULL/PUSH ON : REPO - ${{github.repository}} BY ${{github.actor}} AT ${{steps.date.outputs.date}}\"}'