Spaces:
Sleeping
Sleeping
Commit ·
5abb6bc
1
Parent(s): 535c52b
updated notification.yml and added gitignore and setup.sh
Browse files- .github/workflows/{discord-notification.yml → notification.yml} +6 -6
- .gitignore +2 -0
- setup.sh +16 -0
.github/workflows/{discord-notification.yml → notification.yml}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
name: Discord Notification
|
| 2 |
|
| 3 |
on:
|
| 4 |
push:
|
|
@@ -23,8 +23,8 @@ jobs:
|
|
| 23 |
env:
|
| 24 |
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK }}
|
| 25 |
run: |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
| 1 |
+
name: Discord and Teams Notification
|
| 2 |
|
| 3 |
on:
|
| 4 |
push:
|
|
|
|
| 23 |
env:
|
| 24 |
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK }}
|
| 25 |
run: |
|
| 26 |
+
COMMIT_URL="${{ github.event.head_commit.url }}"
|
| 27 |
+
COMMIT_MESSAGE="${{ github.event.head_commit.message }}"
|
| 28 |
+
curl -H 'Content-Type: application/json' \
|
| 29 |
+
-d "{\"@type\": \"MessageCard\", \"@context\": \"http://schema.org/extensions\", \"summary\": \"New commit in GitHub\", \"sections\": [{\"activityTitle\": \"🔥 **A new commit was pushed to the main branch by $GITHUB_ACTOR** 🔥\", \"text\": \"**Commit Message:** ${COMMIT_MESSAGE}\\n**Commit URL:** [Click Here](${COMMIT_URL})\"}]}" \
|
| 30 |
+
$TEAMS_WEBHOOK_URL
|
.gitignore
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
flagged
|
| 2 |
+
path
|
setup.sh
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Define the path to the virtual environment
|
| 4 |
+
VENV_DIR="path/to/venv"
|
| 5 |
+
|
| 6 |
+
# Create the virtual environment
|
| 7 |
+
python3 -m venv $VENV_DIR
|
| 8 |
+
|
| 9 |
+
# Activate the virtual environment
|
| 10 |
+
source $VENV_DIR/bin/activate
|
| 11 |
+
|
| 12 |
+
# Install required packages
|
| 13 |
+
pip3 install -r requirements.txt
|
| 14 |
+
|
| 15 |
+
# Message to confirm installation completion
|
| 16 |
+
echo "Python environment setup is complete, and packages are installed."
|