Skip to content

Commit

Permalink
Merge pull request #8 from DeVoresyah/development
Browse files Browse the repository at this point in the history
Staging #1
  • Loading branch information
DeVoresyah authored Mar 18, 2021
2 parents 8769b55 + 37469f9 commit be398e4
Showing 2 changed files with 16 additions and 18 deletions.
23 changes: 5 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Github Actions
name: Build & Deploy

on:
push:
@@ -27,27 +27,14 @@ jobs:
chmod +x gradlew
./gradlew assembleRelease
- name: Slack Success Notif
- name: Slack Notify
if: success()
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
uses: voxmedia/github-action-slack-notify-build@v1.1.2
with:
channel_id: ${CHANNEL_ID}
status: SUCCESS
color: good

- name: Slack Failed Notif
if: failure()
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
CHANNEL_ID: ${{ secrets.CHANNEL_ID }}
uses: voxmedia/github-action-slack-notify-build@v1.1.2
with:
channel_id: ${CHANNEL_ID}
status: FAILED
color: danger
run: |
chmod +x .slack-notification
./.slack-notification
- name: Send App to Slack
if: success()
11 changes: 11 additions & 0 deletions .slack-notification
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
MESSAGE="*Deploy to ${GITHUB_REF##*/}* | $(date +'%A, %d %B %Y %H:%M:%S')

The Money Expenses application was successfully deployed :rocket: :rocket: :rocket:

ID: #${GITHUB_RUN_ID}
WORKFLOW: ${GITHUB_WORKFLOW}
SHA: ${GITHUB_SHA}

_don't forget coding today_ :wink:"

curl -v -F channel=$CHANNEL_ID -F token=$SLACK_TOKEN -F text="${MESSAGE}" https://slack.com/api/chat.postMessage

0 comments on commit be398e4

Please sign in to comment.