From ef17390eaa6c6b52de26230f1458420c4202faf6 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 18 Sep 2025 18:11:06 +0530 Subject: [PATCH 01/10] test_pushing --- tensorflow_v1/examples/1_Introduction/helloworld.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow_v1/examples/1_Introduction/helloworld.py b/tensorflow_v1/examples/1_Introduction/helloworld.py index 1c40f315..9b91b3ac 100644 --- a/tensorflow_v1/examples/1_Introduction/helloworld.py +++ b/tensorflow_v1/examples/1_Introduction/helloworld.py @@ -4,7 +4,8 @@ Author: Aymeric Damien Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' - +#THIS IS TO TEST CHANGES AND PUSH GIT +#some mroe code to test discord............ from __future__ import print_function import tensorflow as tf From 56943f9bb8e8cb7966f217fe44ffb9268ddd31f6 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 17:58:44 +0530 Subject: [PATCH 02/10] test_pushing --- tensorflow_v1/examples/1_Introduction/helloworld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_v1/examples/1_Introduction/helloworld.py b/tensorflow_v1/examples/1_Introduction/helloworld.py index 9b91b3ac..9cb377de 100644 --- a/tensorflow_v1/examples/1_Introduction/helloworld.py +++ b/tensorflow_v1/examples/1_Introduction/helloworld.py @@ -10,7 +10,7 @@ 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. From b404dc4179c47a5037e08821ed591fdd8337cf6c Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:20:15 +0530 Subject: [PATCH 03/10] testing after adding yaml file --- .github/workflows/discord.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/discord.yml diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml new file mode 100644 index 00000000..0cf04a5a --- /dev/null +++ b/.github/workflows/discord.yml @@ -0,0 +1,27 @@ +name: Notify Discord on push + +on: + push: + branches: [ "main" ] # change if your branch is master or something else + +jobs: + notify: + runs-on: ubuntu-latest + + steps: + - name: Build message + id: msg + run: | + REPO="${{ github.repository }}" + BRANCH="${{ github.ref_name }}" + COMMITS_URL="https://github.com/${REPO}/commits/${BRANCH}" + TEXT="✅ Push to **${REPO}** on **${BRANCH}** by **${{ github.actor }}**\n${COMMITS_URL}" + echo "content=$TEXT" >> $GITHUB_OUTPUT + + - name: Send to Discord + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + run: | + curl -H "Content-Type: application/json" \ + -d "{\"content\": \"${{ steps.msg.outputs.content }}\"}" \ + "$DISCORD_WEBHOOK" From 9890be5089d2dda8b587fc2d3d0bb264b0deb107 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:23:49 +0530 Subject: [PATCH 04/10] testing after adding yaml file --- tensorflow_v1/examples/1_Introduction/helloworld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_v1/examples/1_Introduction/helloworld.py b/tensorflow_v1/examples/1_Introduction/helloworld.py index 9cb377de..e8750e86 100644 --- a/tensorflow_v1/examples/1_Introduction/helloworld.py +++ b/tensorflow_v1/examples/1_Introduction/helloworld.py @@ -5,7 +5,7 @@ Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' #THIS IS TO TEST CHANGES AND PUSH GIT -#some mroe code to test discord............ +#some mroe code to test discord.....`123`123`123 from __future__ import print_function import tensorflow as tf From 4a41a28a5db8897fbe4ffea6d537c54a51073b6a Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:32:35 +0530 Subject: [PATCH 05/10] testing after adding yaml file --- .github/workflows/discord.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 0cf04a5a..406596ed 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -1,27 +1,29 @@ name: Notify Discord on push on: - push: - branches: [ "main" ] # change if your branch is master or something else - + push: # run on any branch; change if you want jobs: notify: runs-on: ubuntu-latest - steps: - - name: Build message - id: msg + - name: Compose message + id: compose run: | REPO="${{ github.repository }}" BRANCH="${{ github.ref_name }}" - COMMITS_URL="https://github.com/${REPO}/commits/${BRANCH}" - TEXT="✅ Push to **${REPO}** on **${BRANCH}** by **${{ github.actor }}**\n${COMMITS_URL}" - echo "content=$TEXT" >> $GITHUB_OUTPUT + 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 - name: Send to Discord env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + MSG: ${{ env.MSG }} run: | - curl -H "Content-Type: application/json" \ - -d "{\"content\": \"${{ steps.msg.outputs.content }}\"}" \ + # 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" From 22f1cc5a66ea95ffead55cbe8bcfa6b42ca0b115 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:36:20 +0530 Subject: [PATCH 06/10] testing after adding yaml file --- .github/workflows/discord.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 406596ed..423e31df 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -16,6 +16,16 @@ jobs: # 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 }} From e02416280181e4f76c0c21ade442f66ae075f944 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:40:38 +0530 Subject: [PATCH 07/10] testing after adding yaml file --- .github/workflows/discord.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 423e31df..e27e0263 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -1,7 +1,7 @@ name: Notify Discord on push on: - push: # run on any branch; change if you want + push: # run on any branch; change if you wantg jobs: notify: runs-on: ubuntu-latest From a4c60a143472a7ad5430b345f8a0be957c2f8c04 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:44:43 +0530 Subject: [PATCH 08/10] testing after adding yaml file --- .github/workflows/discord.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index e27e0263..df473cc1 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -1,7 +1,7 @@ name: Notify Discord on push on: - push: # run on any branch; change if you wantg + push: # run on any branch; change if you want test again jobs: notify: runs-on: ubuntu-latest From 94c88b6c800cde49fe65c8b0cb6d75aabaffe014 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:50:36 +0530 Subject: [PATCH 09/10] testing after adding yaml file --- .github/workflows/discord.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index df473cc1..6c473662 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -1,7 +1,7 @@ name: Notify Discord on push on: - push: # run on any branch; change if you want test again + push: # run on any branch; change if you want test again and again jobs: notify: runs-on: ubuntu-latest From dd99c4a81a0e82ba0b51c5131471ede1cbfe9087 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 19 Sep 2025 18:52:30 +0530 Subject: [PATCH 10/10] testing after adding yaml file --- examples/1_Introduction/helloworld.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/ '''