diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml new file mode 100644 index 00000000..6c473662 --- /dev/null +++ b/.github/workflows/discord.yml @@ -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" diff --git a/examples/1_Introduction/helloworld.py b/examples/1_Introduction/helloworld.py index 1c40f315..191b1a64 100644 --- a/examples/1_Introduction/helloworld.py +++ b/examples/1_Introduction/helloworld.py @@ -1,7 +1,7 @@ ''' HelloWorld example using TensorFlow library. -Author: Aymeric Damien +Author: Aymeric Damienasxasx Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' diff --git a/tensorflow_v1/examples/1_Introduction/helloworld.py b/tensorflow_v1/examples/1_Introduction/helloworld.py index 1c40f315..e8750e86 100644 --- a/tensorflow_v1/examples/1_Introduction/helloworld.py +++ b/tensorflow_v1/examples/1_Introduction/helloworld.py @@ -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.