diff --git a/.github/workflows/create-release-based-on-tag.yaml b/.github/workflows/create-release-based-on-tag.yaml new file mode 100644 index 0000000..b144aaf --- /dev/null +++ b/.github/workflows/create-release-based-on-tag.yaml @@ -0,0 +1,40 @@ +name: create-release-based-on-label +on: + pull_request: + types: + - closed + branches: + - main +run-name: creating release - ${{ github.event}} PR Number ${{ github.event.number }} +jobs: + create-release-based-on-label: + # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges + # if: ${{ github.event.pull_request.merged == true }} && ${{ github.event.label.name == 'bug' }} + 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-release + uses: devwithkrishna/devwithkrishna-create-release-action@main + with: + token: ${{ steps.token-generation.outputs.token }} + pr_number: ${{ github.event.number }} + generate_release_notes: true + + + + + + + + diff --git a/.github/workflows/first-github-rest-api-call.yaml b/.github/workflows/first-github-rest-api-call.yaml index 00a96b1..19f0c8a 100644 --- a/.github/workflows/first-github-rest-api-call.yaml +++ b/.github/workflows/first-github-rest-api-call.yaml @@ -11,8 +11,12 @@ 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" + - name: branch names + run: + echo "$GITHUB_REF_TYPE branch" diff --git a/.github/workflows/self-hosted-check.yaml b/.github/workflows/self-hosted-check.yaml new file mode 100644 index 0000000..e9e96f2 --- /dev/null +++ b/.github/workflows/self-hosted-check.yaml @@ -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' diff --git a/.github/workflows/sendgrid.yaml b/.github/workflows/sendgrid.yaml new file mode 100644 index 0000000..10b6a95 --- /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: "" + + # - name: program execution completed + # run: echo "program execution completed" diff --git a/.github/workflows/slack-action-check.yml b/.github/workflows/slack-action-check.yml new file mode 100644 index 0000000..365b6c2 --- /dev/null +++ b/.github/workflows/slack-action-check.yml @@ -0,0 +1,45 @@ +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 "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@main + env: + SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} + with: + channel_id: ${{ inputs.channel_id }} + bot_name: ${{ inputs.bot_name }} + file_name: ${{ inputs.file_name }} diff --git a/Docker b/Docker new file mode 100644 index 0000000..b2a7546 --- /dev/null +++ b/Docker @@ -0,0 +1 @@ +ccc diff --git a/LICENSE b/LICENSE index 26a57ee..783c3a3 100644 --- a/LICENSE +++ b/LICENSE @@ -19,3 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + diff --git a/README.md b/README.md index b43ecdc..c8de977 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,13 @@ wqwqwqwqw | TestName | 16-07-2024 | | TestName | 16-07-2024 | | TestName | 16-07-2024 | +| TestName | 16-07-2024 | +| TestName | 16-07-2024 | +| TestName | 16-07-2024 | +| TestName | 16-07-2024 | +| TestName | 16-07-2024 | +| TestName | 16-07-2024 | +| TestName | 16-07-2024 | diff --git a/cognitive services resource graph query b/cognitive services resource graph query new file mode 100644 index 0000000..f2ad6c7 --- /dev/null +++ b/cognitive services resource graph query @@ -0,0 +1 @@ +c diff --git a/github_rest_api.sh b/github_rest_api.sh index ce375e4..d3543e0 100644 --- a/github_rest_api.sh +++ b/github_rest_api.sh @@ -1,6 +1,7 @@ #! /bin/bash +### curl --request GET \ --url "https://api.github.com/devwithkrishna" \ --header "Authorization: Bearer $GITHUB_TOKEN" \ ---header "X-GitHub-Api-Version: 2022-11-28" \ No newline at end of file +--header "X-GitHub-Api-Version: 2022-11-28" diff --git a/newd b/newd new file mode 100644 index 0000000..b914e90 --- /dev/null +++ b/newd @@ -0,0 +1,27 @@ +newd +A +we +qe +qwe +q +we +qw +eq + +3 +w +er +e +tre +td +tg +d +y +ty +rt7r65 + +3w34 +w + +sd +