Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/discord.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Notify Discord on push

on:
push: # run on any branch; change if you want test again and again
jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Compose message
id: compose
run: |
REPO="${{ github.repository }}"
BRANCH="${{ github.ref_name }}"
ACTOR="${{ github.actor }}"
URL="https://github.com/${REPO}/commits/${BRANCH}"
# Use \n inside the string; jq will escape correctly
echo "MSG=✅ Push to **${REPO}** on **${BRANCH}** by **${ACTOR}**\n${URL}" >> $GITHUB_ENV

# 🔎 DEBUG STEP (insert here)
- name: Minimal test to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
run: |
echo "Testing webhook with a simple message..."
curl -i -H "Content-Type: application/json" \
-d '{"content":"Hello from GitHub Actions 👋"}' \
"$DISCORD_WEBHOOK"

- name: Send to Discord
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
MSG: ${{ env.MSG }}
run: |
# Build valid JSON safely
payload=$(jq -nc --arg content "$MSG" '{content:$content}')
# Send and show status + any error body for debugging
curl -sS -i -H "Content-Type: application/json" \
-d "$payload" \
"$DISCORD_WEBHOOK"
2 changes: 1 addition & 1 deletion examples/1_Introduction/helloworld.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
HelloWorld example using TensorFlow library.

Author: Aymeric Damien
Author: Aymeric Damienasxasx
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''

Expand Down
5 changes: 3 additions & 2 deletions tensorflow_v1/examples/1_Introduction/helloworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
Author: Aymeric Damien
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''

#THIS IS TO TEST CHANGES AND PUSH GIT
#some mroe code to test discord.....`123`123`123
from __future__ import print_function

import tensorflow as tf

# Simple hello world using TensorFlow
# Simple hello world using TensorFlowjhb

# Create a Constant op
# The op is added as a node to the default graph.
Expand Down