Spaces:
Sleeping
Sleeping
Update main.yml
Browse files- .github/workflows/main.yml +27 -0
.github/workflows/main.yml
CHANGED
|
@@ -17,3 +17,30 @@ jobs:
|
|
| 17 |
env:
|
| 18 |
HF_TOKEN: ${{ secrets.HF_Token }}
|
| 19 |
run: git push https://KeerthiVM:$HF_TOKEN@huggingface.co/spaces/SkinCancerDiagnosis/Translator_API main --force
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
env:
|
| 18 |
HF_TOKEN: ${{ secrets.HF_Token }}
|
| 19 |
run: git push https://KeerthiVM:$HF_TOKEN@huggingface.co/spaces/SkinCancerDiagnosis/Translator_API main --force
|
| 20 |
+
notify_slack_on_success:
|
| 21 |
+
runs-on: ubuntu-latest
|
| 22 |
+
needs: sync-to-hub
|
| 23 |
+
if: success()
|
| 24 |
+
steps:
|
| 25 |
+
- name: Send Slack notification on success
|
| 26 |
+
uses: rtCamp/action-slack-notify@v2
|
| 27 |
+
env:
|
| 28 |
+
SLACK_WEBHOOK: ${{ secrets.SLACK_SECRET }}
|
| 29 |
+
SLACK_COLOR: 'good'
|
| 30 |
+
SLACK_TITLE: 'Build Successfully Passed & Deployed for Translator!'
|
| 31 |
+
SLACK_MESSAGE: 'Build for `${{ github.repository }}` passed. Commit by @${{ github.actor }}.'
|
| 32 |
+
SLACK_FOOTER: 'Changes: ${{ github.event.head_commit.message }}'
|
| 33 |
+
|
| 34 |
+
notify_slack_on_failure:
|
| 35 |
+
runs-on: ubuntu-latest
|
| 36 |
+
needs: sync-to-hub
|
| 37 |
+
if: failure()
|
| 38 |
+
steps:
|
| 39 |
+
- name: Send Slack notification on failure
|
| 40 |
+
uses: rtCamp/action-slack-notify@v2
|
| 41 |
+
env:
|
| 42 |
+
SLACK_WEBHOOK: ${{ secrets.SLACK_SECRET }}
|
| 43 |
+
SLACK_COLOR: 'danger'
|
| 44 |
+
SLACK_TITLE: 'Build FAILED for Translator!'
|
| 45 |
+
SLACK_MESSAGE: '<!here> Build for `${{ github.repository }}` failed. Commit by @${{ github.actor }}. Deployment was skipped.'
|
| 46 |
+
SLACK_FOOTER: '<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Click to View Failed Run>'
|