From 7e1d661f34f5b9e42f0e16a6daa63db56da47ef4 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Fri, 2 Aug 2024 01:50:13 +0530 Subject: [PATCH 01/16] Create slack-action-check.yml --- .github/workflows/slack-action-check.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/slack-action-check.yml diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml new file mode 100644 index 0000000..f121bdb --- /dev/null +++ b/.github/workflows/slack-action-check.yml @@ -0,0 +1 @@ +name From dee04c8b696b2ba76c2dd14701cdbb9658957186 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Fri, 2 Aug 2024 01:56:57 +0530 Subject: [PATCH 02/16] Update slack-action-check.yml --- .github/workflows/slack-action-check.yml | 41 +++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml index f121bdb..4f37ce5 100644 --- a/.github/workflows/slack-action-check.yml +++ b/.github/workflows/slack-action-check.yml @@ -1 +1,40 @@ -name +name: slack action check +on: + workflow_dispatch: + inputs: + channel_id: + default: 'C07EVSM8EUS' + type: string + bot_name: + default: 'alerts-bot' + type: string + file_name: + default: 'a.txt, b.txt' + type: string +jobs: + slack-check: + runs-on: ubuntu-latest + steps: + - name: Token generator + uses: githubofkrishnadhas/github-access-using-githubapp@v2 + id: token-generation + with: + github_app_id: ${{ secrets.TOKEN_GENERATOR_APPID }} + github_app_private_key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }} + + - name: Checkout Repository + uses: actions/checkout@v4 + with: + token: ${{ steps.token-generation.outputs.token }} + + - name: create files + run: | + echo "This is test 1 actions repo" > a.txt + echo "this is verification from slack action. All good confirmed" > b.txt + + - name: slack test + uses: devwithkrishna/send-notifications-to-slack-from-github@v1.0.0 + with: + channel_id: ${{ inputs.channel_id }}} + bot_name: ${{ inputs.bot_name }} + file_name: ${{ inputs.file_name }} From b1e19f3d821d654e46fb74b98ed0ba2e3bdf5c12 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:01:50 +0530 Subject: [PATCH 03/16] Update slack-action-check.yml --- .github/workflows/slack-action-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml index 4f37ce5..aa8e257 100644 --- a/.github/workflows/slack-action-check.yml +++ b/.github/workflows/slack-action-check.yml @@ -33,7 +33,7 @@ jobs: echo "this is verification from slack action. All good confirmed" > b.txt - name: slack test - uses: devwithkrishna/send-notifications-to-slack-from-github@v1.0.0 + uses: devwithkrishna/send-notifications-to-slack-from-github@feature/v1 with: channel_id: ${{ inputs.channel_id }}} bot_name: ${{ inputs.bot_name }} From 4a7874597a29577c9faf528d4f26e2d2f8c10534 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:03:53 +0530 Subject: [PATCH 04/16] Update slack-action-check.yml --- .github/workflows/slack-action-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml index aa8e257..cb50ff6 100644 --- a/.github/workflows/slack-action-check.yml +++ b/.github/workflows/slack-action-check.yml @@ -35,6 +35,6 @@ jobs: - name: slack test uses: devwithkrishna/send-notifications-to-slack-from-github@feature/v1 with: - channel_id: ${{ inputs.channel_id }}} + channel_id: ${{ inputs.channel_id }} bot_name: ${{ inputs.bot_name }} file_name: ${{ inputs.file_name }} From 37d920e6d29f04efe8672b108dc119d5923b4643 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:07:34 +0530 Subject: [PATCH 05/16] Update slack-action-check.yml --- .github/workflows/slack-action-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml index cb50ff6..901236a 100644 --- a/.github/workflows/slack-action-check.yml +++ b/.github/workflows/slack-action-check.yml @@ -31,6 +31,8 @@ jobs: run: | echo "This is test 1 actions repo" > a.txt echo "this is verification from slack action. All good confirmed" > b.txt + ls -la + sleep 10 - name: slack test uses: devwithkrishna/send-notifications-to-slack-from-github@feature/v1 From 41c23fe3d9ddd095b4903ac3ac86936ccf4df5be Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:35:38 +0530 Subject: [PATCH 06/16] Update slack-action-check.yml --- .github/workflows/slack-action-check.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml index 901236a..252747d 100644 --- a/.github/workflows/slack-action-check.yml +++ b/.github/workflows/slack-action-check.yml @@ -36,6 +36,8 @@ jobs: - name: slack test uses: devwithkrishna/send-notifications-to-slack-from-github@feature/v1 + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} with: channel_id: ${{ inputs.channel_id }} bot_name: ${{ inputs.bot_name }} From 100dab11dc4e6ca1ec1514b6763c33162e626fc7 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:49:48 +0530 Subject: [PATCH 07/16] Update slack-action-check.yml --- .github/workflows/slack-action-check.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml index 252747d..365b6c2 100644 --- a/.github/workflows/slack-action-check.yml +++ b/.github/workflows/slack-action-check.yml @@ -30,12 +30,13 @@ jobs: - name: create files run: | echo "This is test 1 actions repo" > a.txt + echo "I am awesome.txt. All good confirmed" > bb.txt echo "this is verification from slack action. All good confirmed" > b.txt ls -la sleep 10 - name: slack test - uses: devwithkrishna/send-notifications-to-slack-from-github@feature/v1 + uses: devwithkrishna/send-notifications-to-slack-from-github@main env: SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} with: From 30fae759fbc2e4af804f4a7950b5541396d3568e Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:58:12 +0530 Subject: [PATCH 08/16] Create sendgrid.yaml --- .github/workflows/sendgrid.yaml | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/sendgrid.yaml diff --git a/.github/workflows/sendgrid.yaml b/.github/workflows/sendgrid.yaml new file mode 100644 index 0000000..bcb609f --- /dev/null +++ b/.github/workflows/sendgrid.yaml @@ -0,0 +1,47 @@ +name: send-email +on: + workflow_dispatch: + +jobs: + send-email: + # runs-on: ubuntu-latest + + # steps: + # - uses: githubofkrishnadhas/github-access-using-githubapp@v2 + # id: token-generation + # with: + # github_app_id: ${{ secrets.TOKEN_GENERATOR_APPID }} + # github_app_private_key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }} + + # - name: Checkout Repository + # uses: actions/checkout@v4 + # with: + # repository: 'devwithkrishna/sendgrid-docker-image' + # token: ${{ steps.token-generation.outputs.token }} + # fetch-depth: 1 + + # - name: set up python + # uses: actions/setup-python@v2 + # with: + # python-version: '3.11' + + # - name: package installations + # run: | + # pip install poetry + # poetry -v install --no-ansi --no-interaction --only main + + # - name: run python program + # env: + # SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} + # run: | + # poetry run python3 sendgrid_email.py --subject "${{ inputs.subject }}" --recepient "${{ inputs.recepient }}" --email_body "${{ inputs.email_body }}" --cced "${{ inputs.cced }}" + uses: devwithkrishna/sendgrid-docker-image/.github/workflows/send_email.yaml@main + secrets: inherit + with: + subject: "shdbadbsadh" + recepient: "krishnadhasnk1997@gmail.com" + email_body: "awdsadsd" + cced: "krishnadhasnk@gmail.com" + + # - name: program execution completed + # run: echo "program execution completed" From 8e43b8fd0acae745c1eb24d7c0d8ad784e519b71 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:26:55 +0530 Subject: [PATCH 09/16] Update sendgrid.yaml --- .github/workflows/sendgrid.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sendgrid.yaml b/.github/workflows/sendgrid.yaml index bcb609f..10b6a95 100644 --- a/.github/workflows/sendgrid.yaml +++ b/.github/workflows/sendgrid.yaml @@ -41,7 +41,7 @@ jobs: subject: "shdbadbsadh" recepient: "krishnadhasnk1997@gmail.com" email_body: "awdsadsd" - cced: "krishnadhasnk@gmail.com" + cced: "" # - name: program execution completed # run: echo "program execution completed" From 26eddf35bc71f102a67f47d7ad5dc47c4880d151 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:38:50 +0530 Subject: [PATCH 10/16] Update first-github-rest-api-call.yaml --- .github/workflows/first-github-rest-api-call.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/first-github-rest-api-call.yaml b/.github/workflows/first-github-rest-api-call.yaml index 00a96b1..834fb73 100644 --- a/.github/workflows/first-github-rest-api-call.yaml +++ b/.github/workflows/first-github-rest-api-call.yaml @@ -11,8 +11,9 @@ jobs: uses: actions/checkout@v4 - name: run bash script run: | - bash github_rest_api.sh - with: - GITHUB_ + echo hello + - name: branch name + run: + echo "${{ github.ref }} branch" From 1140e5382b45487453a7c6997459211323efbd8e Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:40:11 +0530 Subject: [PATCH 11/16] Update first-github-rest-api-call.yaml --- .github/workflows/first-github-rest-api-call.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/first-github-rest-api-call.yaml b/.github/workflows/first-github-rest-api-call.yaml index 834fb73..0e6ae99 100644 --- a/.github/workflows/first-github-rest-api-call.yaml +++ b/.github/workflows/first-github-rest-api-call.yaml @@ -15,5 +15,8 @@ jobs: - name: branch name run: echo "${{ github.ref }} branch" + - name: branch names + run: + echo "${{ github.ref.name }} branch" From bd03c53620796557aecdcf2dd46bdf7d59d6324c Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:41:39 +0530 Subject: [PATCH 12/16] Update first-github-rest-api-call.yaml --- .github/workflows/first-github-rest-api-call.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/first-github-rest-api-call.yaml b/.github/workflows/first-github-rest-api-call.yaml index 0e6ae99..8b36b9d 100644 --- a/.github/workflows/first-github-rest-api-call.yaml +++ b/.github/workflows/first-github-rest-api-call.yaml @@ -17,6 +17,6 @@ jobs: echo "${{ github.ref }} branch" - name: branch names run: - echo "${{ github.ref.name }} branch" + echo "$GITHUB_REF_TYPE branch" From a4f0263b758f94942c6c8551f9b3f0ca116cd103 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:43:34 +0530 Subject: [PATCH 13/16] Update first-github-rest-api-call.yaml --- .github/workflows/first-github-rest-api-call.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/first-github-rest-api-call.yaml b/.github/workflows/first-github-rest-api-call.yaml index 8b36b9d..502c660 100644 --- a/.github/workflows/first-github-rest-api-call.yaml +++ b/.github/workflows/first-github-rest-api-call.yaml @@ -14,7 +14,7 @@ jobs: echo hello - name: branch name run: - echo "${{ github.ref }} branch" + echo "${{ GITHUB_REF }} branch" - name: branch names run: echo "$GITHUB_REF_TYPE branch" From 4ed7bf792e718f0c7e515ffe46a1fb93cfa15c9c Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:44:11 +0530 Subject: [PATCH 14/16] Update first-github-rest-api-call.yaml --- .github/workflows/first-github-rest-api-call.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/first-github-rest-api-call.yaml b/.github/workflows/first-github-rest-api-call.yaml index 502c660..19f0c8a 100644 --- a/.github/workflows/first-github-rest-api-call.yaml +++ b/.github/workflows/first-github-rest-api-call.yaml @@ -14,7 +14,7 @@ jobs: echo hello - name: branch name run: - echo "${{ GITHUB_REF }} branch" + echo "$GITHUB_REF branch" - name: branch names run: echo "$GITHUB_REF_TYPE branch" From 19178cff85dd37b97ab6b0eaa5f18d482cd2ee69 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:26:41 +0530 Subject: [PATCH 15/16] Create self-hosted-check --- .github/workflows/self-hosted-check | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/self-hosted-check diff --git a/.github/workflows/self-hosted-check b/.github/workflows/self-hosted-check new file mode 100644 index 0000000..e9e96f2 --- /dev/null +++ b/.github/workflows/self-hosted-check @@ -0,0 +1,25 @@ +name: Azure Auth and az account show on selfhosted runner + +on: +# push: + workflow_dispatch: + +jobs: + azure-auth: + runs-on: self-hosted + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Azure CLI script + uses: azure/cli@v2 + with: + azcliversion: latest + inlineScript: | + az login --service-principal -u ${{ secrets.ARM_CLIENT_ID }} -p ${{ secrets.ARM_CLIENT_SECRET }} --tenant ${{ secrets.ARM_TENANT_ID }} + az account set --subscription ${{ secrets.ARM_SUBSCRIPTION_ID }} + az account show -o json + + - name: Completed + run: echo 'completed' From 5acbdcf9948c343a04946679ca14dad4786d3ae8 Mon Sep 17 00:00:00 2001 From: Krishnadhas N K <108367225+githubofkrishnadhas@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:27:22 +0530 Subject: [PATCH 16/16] Rename self-hosted-check to self-hosted-check.yaml --- .github/workflows/{self-hosted-check => self-hosted-check.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{self-hosted-check => self-hosted-check.yaml} (100%) diff --git a/.github/workflows/self-hosted-check b/.github/workflows/self-hosted-check.yaml similarity index 100% rename from .github/workflows/self-hosted-check rename to .github/workflows/self-hosted-check.yaml