chore(pipeline): update slack_action to 0.3.1 #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Last commit build | |
on: | |
push: | |
branches: [ swift ] | |
workflow_dispatch: | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
jobs: | |
build: | |
name: Build | |
runs-on: macos-12 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Remove old directories | |
run: rm -rf ~/tmp | rm -rf ~/Library/MobileDevice | |
shell: bash | |
- name: Build And Test | |
run: cd HostApp && xcodebuild test -scheme HostApp -sdk iphonesimulator16.2 -destination "OS=16.2,name=iPhone 14" | |
shell: bash | |
- if: ${{ failure() }} | |
name: Slack Notification On Error | |
uses: megamegax/[email protected] | |
with: | |
webhook_url: '${{env.SLACK_WEBHOOK}}' | |
actions: '[{ "type": "button", "text": "View actions", "url": "https://github.com/emartech/ios-emarsys-sdk/actions" }]' | |
channel: ${{ secrets.SLACK_CHANNEL }} | |
job_status: failure | |
message: 'Last push build failed! :sob:' | |
user_icon: 'https://img.pngio.com/rotten-apple-png-images-vectors-and-psd-files-free-download-on-png-rotten-apple-260_391.png' | |
user_name: Emarsys SDK - iOS | |
- if: ${{ !failure() }} | |
name: Slack Notification On Success | |
uses: megamegax/[email protected] | |
with: | |
webhook_url: '${{env.SLACK_WEBHOOK}}' | |
actions: '[{ "type": "button", "text": "View actions", "url": "https://github.com/emartech/ios-emarsys-sdk/actions" }]' | |
channel: ${{ secrets.SLACK_CHANNEL }} | |
job_status: 'success' | |
message: 'Last push build successful! :man-gesturing-ok: :bananadance:' | |
user_icon: 'https://www.apple.com/ac/structured-data/images/knowledge_graph_logo.png' | |
user_name: Emarsys SDK - iOS |