From bb64fc349baabbff126139049dca5a1cb97c1007 Mon Sep 17 00:00:00 2001 From: Private Date: Sun, 15 May 2022 13:25:55 +0200 Subject: [PATCH 01/62] API changes --- GitActions.API/GitActions.API.csproj | 1 + 1 file changed, 1 insertion(+) diff --git a/GitActions.API/GitActions.API.csproj b/GitActions.API/GitActions.API.csproj index a76a954..c335080 100644 --- a/GitActions.API/GitActions.API.csproj +++ b/GitActions.API/GitActions.API.csproj @@ -5,6 +5,7 @@ enable + From c46a975c612d0a7dafe19b0381ce4bce5a97b6d2 Mon Sep 17 00:00:00 2001 From: Private Date: Sun, 15 May 2022 13:29:18 +0200 Subject: [PATCH 02/62] dummy actios --- .github/workflows/github-actions-demo.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..75be101 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,17 @@ +name: GitHub Actions Demo +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From b39a72c7db6ab277169422877ec4f8f1f44f63aa Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 16 May 2022 16:49:54 +0200 Subject: [PATCH 03/62] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 75be101..a8a5b5a 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,5 +1,9 @@ name: GitHub Actions Demo -on: [push] +on: + push: + repository_dispatch: + types: [ test ] + jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest From fb6ad4d6e5c7298ac7c3e418971de89b877c56e4 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 16:48:22 +0200 Subject: [PATCH 04/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 2c9090b..548bf6f 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -7,16 +7,19 @@ on: branches: [ main ] jobs: - build: - - runs-on: ubuntu-latest + build: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + dotnet-version: [5.0.x, 6.0.x] steps: - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: - dotnet-version: 5.0.x + dotnet-version: ${{matrix.dotnet-version}} - name: Restore dependencies run: dotnet restore - name: Build From f1082115acc03fc30561d689576627cfd73fb2e1 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 17:06:50 +0200 Subject: [PATCH 05/62] Create node.js.yml --- .github/workflows/node.js.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..90816c8 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,37 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - name: upload artifcats + uses: action/upload-artifcats@main + with: + name: "Upload to publich" + path: public/ + From dd89d1a72608897b3ebc6bd6709e2bfd2a5682eb Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 17:09:19 +0200 Subject: [PATCH 06/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 548bf6f..6f19a2b 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,3 +26,8 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal + - name: upload artifcats + uses: action/upload-artifcats@main + with: + name: "Upload to publich" + path: public/ From eb6e558f19d51a13605f5366470bcb013418ab13 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 17:11:23 +0200 Subject: [PATCH 07/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6f19a2b..4f34ebb 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,7 +27,7 @@ jobs: - name: Test run: dotnet test --no-build --verbosity normal - name: upload artifcats - uses: action/upload-artifcats@main + uses: action/upload-artifcats@v3 with: name: "Upload to publich" path: public/ From 8f72ac1e1d6906fb11af1390df75b4b98f0f2c88 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 17:12:54 +0200 Subject: [PATCH 08/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 4f34ebb..5c80015 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,7 +27,7 @@ jobs: - name: Test run: dotnet test --no-build --verbosity normal - name: upload artifcats - uses: action/upload-artifcats@v3 + uses: actions/upload-artifcats@v3 with: - name: "Upload to publich" + name: "Upload to publish" path: public/ From cf899509e4dc1dee373bb5b5a3b3593a022656c8 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 17:14:08 +0200 Subject: [PATCH 09/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 5c80015..96793dc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,8 +26,7 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal - - name: upload artifcats - uses: actions/upload-artifcats@v3 + - uses: actions/upload-artifact@main with: - name: "Upload to publish" + name: webpack artifacts path: public/ From 5c3135c5e48f491c36d420d45e4e5906be171125 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 18:11:20 +0200 Subject: [PATCH 10/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 96793dc..e2e85e8 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -26,7 +26,10 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal - - uses: actions/upload-artifact@main + - name: dotonet publish + run: dotnet publish + - name: publish artifacts + uses: actions/upload-artifact@main with: name: webpack artifacts - path: public/ + path: / From 0f81a9cfe5760d77d32c261fc1cb3ab5c30334da Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 18:21:47 +0200 Subject: [PATCH 11/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e2e85e8..ebbeb7c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,7 +15,15 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [5.0.x, 6.0.x] steps: - - uses: actions/checkout@v3 + - name: Label when approved + uses: pullreminders/label-when-approved-action@master + env: + APPROVALS: "2" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ADD_LABEL: "approved" + REMOVE_LABEL: "awaiting%20review" + - name: Checkout + uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: @@ -28,8 +36,4 @@ jobs: run: dotnet test --no-build --verbosity normal - name: dotonet publish run: dotnet publish - - name: publish artifacts - uses: actions/upload-artifact@main - with: - name: webpack artifacts - path: / + From 1f57fbcd269a1c0a8cc454188d690efb94fb2291 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 18:47:33 +0200 Subject: [PATCH 12/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ebbeb7c..30480db 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,7 +5,8 @@ on: branches: [ main ] pull_request: branches: [ main ] - + pull_request_review: + types: [submitted] jobs: build: From 668da3f688eee2b69b8cb6bcc182c81dfb547b53 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 18:58:36 +0200 Subject: [PATCH 13/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 30480db..fec24de 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,6 +16,9 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [5.0.x, 6.0.x] steps: + - uses: pullreminders/assignee-to-reviewer-action@v1.0.4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Label when approved uses: pullreminders/label-when-approved-action@master env: From d4f8e59d1f633b8b76fca6861a5a1d4ef9082b4c Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:01:35 +0200 Subject: [PATCH 14/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index fec24de..1122a73 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,8 +5,6 @@ on: branches: [ main ] pull_request: branches: [ main ] - pull_request_review: - types: [submitted] jobs: build: @@ -16,6 +14,8 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [5.0.x, 6.0.x] steps: + - name: run command + run: ls - uses: pullreminders/assignee-to-reviewer-action@v1.0.4 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2f0aae173fcc398231b0336203b5223cb5574027 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:07:26 +0200 Subject: [PATCH 15/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1122a73..9ec7751 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,16 +16,6 @@ jobs: steps: - name: run command run: ls - - uses: pullreminders/assignee-to-reviewer-action@v1.0.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Label when approved - uses: pullreminders/label-when-approved-action@master - env: - APPROVALS: "2" - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ADD_LABEL: "approved" - REMOVE_LABEL: "awaiting%20review" - name: Checkout uses: actions/checkout@v3 - name: Setup .NET From d25476ecc776861cf588bebd4eb22c9797e212db Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:16:51 +0200 Subject: [PATCH 16/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9ec7751..628d2bc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,8 +14,12 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [5.0.x, 6.0.x] steps: - - name: run command + - name: when Ubuntu + if: ${{matrix.os}} == 'ubuntu-latest' run: ls + - name: when windows + if: ${{matrix.os}} == 'windows-latest' + run: dir - name: Checkout uses: actions/checkout@v3 - name: Setup .NET From 834697d1a2b030d2acdd2588841bbc47610bbc6f Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:19:35 +0200 Subject: [PATCH 17/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 628d2bc..e82e993 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -8,6 +8,8 @@ on: jobs: build: + env: + varname: atef runs-on: ${{matrix.os}} strategy: matrix: @@ -16,7 +18,7 @@ jobs: steps: - name: when Ubuntu if: ${{matrix.os}} == 'ubuntu-latest' - run: ls + run: echo env:varname - name: when windows if: ${{matrix.os}} == 'windows-latest' run: dir From 6c7d4af0e8e8635a90d59ef3fb25a095728e0007 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:22:58 +0200 Subject: [PATCH 18/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e82e993..5e7e7e6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -8,8 +8,6 @@ on: jobs: build: - env: - varname: atef runs-on: ${{matrix.os}} strategy: matrix: @@ -18,7 +16,9 @@ jobs: steps: - name: when Ubuntu if: ${{matrix.os}} == 'ubuntu-latest' - run: echo env:varname + run: echo $varname + env: + varname: atef - name: when windows if: ${{matrix.os}} == 'windows-latest' run: dir From 0a36cbccfb6d522d6654d3b24fea1ca596a35730 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:26:17 +0200 Subject: [PATCH 19/62] Create script.sh --- .github/workflows/script.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/script.sh diff --git a/.github/workflows/script.sh b/.github/workflows/script.sh new file mode 100644 index 0000000..9e2740c --- /dev/null +++ b/.github/workflows/script.sh @@ -0,0 +1 @@ +ls From e2ee623538a82127155d7fe7fbea9374945cf72a Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:27:20 +0200 Subject: [PATCH 20/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 5e7e7e6..512ae6e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -14,11 +14,9 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [5.0.x, 6.0.x] steps: - - name: when Ubuntu - if: ${{matrix.os}} == 'ubuntu-latest' - run: echo $varname - env: - varname: atef + - name: run script + run: script.sh + shell: bash - name: when windows if: ${{matrix.os}} == 'windows-latest' run: dir From 9928eadb17f8a0ee92f9c08e5d10d157a3d25708 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:33:35 +0200 Subject: [PATCH 21/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 512ae6e..ca9f56e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,10 +15,11 @@ jobs: dotnet-version: [5.0.x, 6.0.x] steps: - name: run script - run: script.sh + if: ${{runners.os}} == 'ubuntu-latest' + run: ./script.sh shell: bash - name: when windows - if: ${{matrix.os}} == 'windows-latest' + if: ${{runners.os}} == 'windows-latest' run: dir - name: Checkout uses: actions/checkout@v3 From 4ecf1cab5adafa983bad18065befb381877a0663 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:33:58 +0200 Subject: [PATCH 22/62] Delete node.js.yml --- .github/workflows/node.js.yml | 37 ----------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml deleted file mode 100644 index 90816c8..0000000 --- a/.github/workflows/node.js.yml +++ /dev/null @@ -1,37 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions - -name: Node.js CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [12.x, 14.x, 16.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test - - name: upload artifcats - uses: action/upload-artifcats@main - with: - name: "Upload to publich" - path: public/ - From 3f668081336f5502557a1b4d9cfd69b4f7abc677 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:34:16 +0200 Subject: [PATCH 23/62] Delete github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml deleted file mode 100644 index a8a5b5a..0000000 --- a/.github/workflows/github-actions-demo.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: GitHub Actions Demo -on: - push: - repository_dispatch: - types: [ test ] - -jobs: - Explore-GitHub-Actions: - runs-on: ubuntu-latest - steps: - - run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - - name: Check out repository code - uses: actions/checkout@v3 - - run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner." - - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." From f7261ee85d8c5025cadb77ada7a4a36aaf274fc8 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:35:22 +0200 Subject: [PATCH 24/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ca9f56e..ba2c246 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - dotnet-version: [5.0.x, 6.0.x] + dotnet-version: [6.0.x] steps: - name: run script if: ${{runners.os}} == 'ubuntu-latest' From ae2c565bf4eff80ae69046e387a4a52d3bfd080f Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:37:37 +0200 Subject: [PATCH 25/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index ba2c246..c6f5135 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,5 +1,4 @@ name: .NET - on: push: branches: [ main ] @@ -15,11 +14,11 @@ jobs: dotnet-version: [6.0.x] steps: - name: run script - if: ${{runners.os}} == 'ubuntu-latest' + if: ${{runner.os}} == 'ubuntu-latest' run: ./script.sh shell: bash - name: when windows - if: ${{runners.os}} == 'windows-latest' + if: ${{runner.os}} == 'windows-latest' run: dir - name: Checkout uses: actions/checkout@v3 @@ -33,6 +32,6 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal - - name: dotonet publish + - name: dotnet publish run: dotnet publish From defcd7cc0935b544b8a6cdd92a6fbec364a77233 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:39:01 +0200 Subject: [PATCH 26/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index c6f5135..40579a6 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,7 +15,7 @@ jobs: steps: - name: run script if: ${{runner.os}} == 'ubuntu-latest' - run: ./script.sh + run: ./.github/workflows/script.sh shell: bash - name: when windows if: ${{runner.os}} == 'windows-latest' From 42e5e8ab48395f61ea0e74b84a396d00f09cb68f Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:43:54 +0200 Subject: [PATCH 27/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 40579a6..0958814 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,6 +13,13 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [6.0.x] steps: + - name: Cache NPM dependencies + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm-cache- - name: run script if: ${{runner.os}} == 'ubuntu-latest' run: ./.github/workflows/script.sh From 5b4e637476ac5a3c8fcbc6891dcb3cf5ebbe9d0b Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:45:44 +0200 Subject: [PATCH 28/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 0958814..aee9a78 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,6 +13,8 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [6.0.x] steps: + - name: get env name + run: echo ${{ runner.os }} - name: Cache NPM dependencies uses: actions/cache@v2 with: From 4819aea026da75e278e4c0181e8df8098e7f3bbd Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:46:53 +0200 Subject: [PATCH 29/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index aee9a78..30c4753 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,11 +23,11 @@ jobs: restore-keys: | ${{ runner.os }}-npm-cache- - name: run script - if: ${{runner.os}} == 'ubuntu-latest' + if: ${{runner.os}} == 'Linux' run: ./.github/workflows/script.sh shell: bash - name: when windows - if: ${{runner.os}} == 'windows-latest' + if: ${{ runner.os }} == 'windows-latest' run: dir - name: Checkout uses: actions/checkout@v3 From 92fc36153491446ea25374b3f46fae099681738a Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:47:19 +0200 Subject: [PATCH 30/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 30c4753..d1c58b5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -23,7 +23,7 @@ jobs: restore-keys: | ${{ runner.os }}-npm-cache- - name: run script - if: ${{runner.os}} == 'Linux' + if: ${{ runner.os }} == 'Linux' run: ./.github/workflows/script.sh shell: bash - name: when windows From c471a12f655055db77d7f254f41e197168c3d548 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:56:37 +0200 Subject: [PATCH 31/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d1c58b5..9787be9 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,6 +13,16 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [6.0.x] steps: + - name: upload artifacts + uses: actions/upload-artifact@v2 + with: + file: ./.github/workflows/script.sh + name: script + - name: upload artifacts + uses: actions/download-artifact@v2 + with: + name: script + - run: cat script.sh - name: get env name run: echo ${{ runner.os }} - name: Cache NPM dependencies From 38d7c891989a3ecc822b677fff46258611093354 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 19:57:36 +0200 Subject: [PATCH 32/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9787be9..d1f6559 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,7 +16,7 @@ jobs: - name: upload artifacts uses: actions/upload-artifact@v2 with: - file: ./.github/workflows/script.sh + path: ./.github/workflows/script.sh name: script - name: upload artifacts uses: actions/download-artifact@v2 From b50797b8addfe7877ab0699e1f795fb7a2156848 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 20:01:17 +0200 Subject: [PATCH 33/62] Create main.sh --- .github/script/main.sh | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/script/main.sh diff --git a/.github/script/main.sh b/.github/script/main.sh new file mode 100644 index 0000000..9e2740c --- /dev/null +++ b/.github/script/main.sh @@ -0,0 +1 @@ +ls From 5b53a5154223fbc52367d608050f34807d939b2c Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 20:02:07 +0200 Subject: [PATCH 34/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d1f6559..b6844a1 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -16,7 +16,7 @@ jobs: - name: upload artifacts uses: actions/upload-artifact@v2 with: - path: ./.github/workflows/script.sh + path: ./.github/script/main.sh name: script - name: upload artifacts uses: actions/download-artifact@v2 @@ -34,7 +34,7 @@ jobs: ${{ runner.os }}-npm-cache- - name: run script if: ${{ runner.os }} == 'Linux' - run: ./.github/workflows/script.sh + run: ./.github/script/main.sh shell: bash - name: when windows if: ${{ runner.os }} == 'windows-latest' From 130e5f11c434d22def06f08370579d5541837fea Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 20:03:58 +0200 Subject: [PATCH 35/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b6844a1..2a40059 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -13,6 +13,8 @@ jobs: os: [ubuntu-latest, windows-latest] dotnet-version: [6.0.x] steps: + - name: Checkout + uses: actions/checkout@v3 - name: upload artifacts uses: actions/upload-artifact@v2 with: @@ -39,8 +41,6 @@ jobs: - name: when windows if: ${{ runner.os }} == 'windows-latest' run: dir - - name: Checkout - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v2 with: From eb00a137b3d26d2fe6f3ff1c4288b47a1f349520 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 20:06:30 +0200 Subject: [PATCH 36/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 2a40059..cfea801 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -27,16 +27,9 @@ jobs: - run: cat script.sh - name: get env name run: echo ${{ runner.os }} - - name: Cache NPM dependencies - uses: actions/cache@v2 - with: - path: ~/.npm - key: ${{ runner.os }}-npm-cache-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm-cache- - name: run script if: ${{ runner.os }} == 'Linux' - run: ./.github/script/main.sh + run: ./script/main.sh shell: bash - name: when windows if: ${{ runner.os }} == 'windows-latest' From 6f6e57c527a0b443af79d868e655137e67b78cbe Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 20:07:19 +0200 Subject: [PATCH 37/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cfea801..9c311be 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -24,7 +24,7 @@ jobs: uses: actions/download-artifact@v2 with: name: script - - run: cat script.sh + - run: cat main.sh - name: get env name run: echo ${{ runner.os }} - name: run script From 4f4ba4c4b624b839fd8dececba110bc14352ad50 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Sun, 22 May 2022 20:09:32 +0200 Subject: [PATCH 38/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 9c311be..6c0360a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -20,7 +20,7 @@ jobs: with: path: ./.github/script/main.sh name: script - - name: upload artifacts + - name: downoad artifacts uses: actions/download-artifact@v2 with: name: script @@ -29,7 +29,7 @@ jobs: run: echo ${{ runner.os }} - name: run script if: ${{ runner.os }} == 'Linux' - run: ./script/main.sh + run: main.sh shell: bash - name: when windows if: ${{ runner.os }} == 'windows-latest' From 7d6e461161215994eec131fae384fe792b530cb0 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 00:14:29 +0200 Subject: [PATCH 39/62] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8628922..bf779db 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# gitactions \ No newline at end of file +![example branch parameter.](https://github.com/mona/special-octo-eureka/actions/workflows/grading.yml/badge.svg?branch=my-workflow) From 52afa7a633c5f8345a324c17c261bf4d35b2bb6b Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:39:35 +0200 Subject: [PATCH 40/62] Create script_pipeline.yml --- .github/workflows/script_pipeline.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/script_pipeline.yml diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml new file mode 100644 index 0000000..4c465a4 --- /dev/null +++ b/.github/workflows/script_pipeline.yml @@ -0,0 +1,22 @@ +name: write comments +on: + issues: + types: [opened ] +jobs: + comment_issue: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: ["ubuntu-latest", "windows-latest"] + if: contains(${{runner.os}},'Linux'') + steps: + - uses: actions/github_script@0.8.0 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }); + From 43b03ccc5d90fe937eb372ea4c5819545f4902c1 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:41:38 +0200 Subject: [PATCH 41/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 4c465a4..5484c88 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -10,13 +10,14 @@ jobs: os: ["ubuntu-latest", "windows-latest"] if: contains(${{runner.os}},'Linux'') steps: - - uses: actions/github_script@0.8.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - }); + - uses: actions/github-script@0.8.0 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "πŸŽ‰ You've created this issue comment using GitHub Script!!!" + }) From 664c7148bd7c2000d525d874c4bc18ff49f7b84c Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:48:59 +0200 Subject: [PATCH 42/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 5484c88..2bac92b 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -10,6 +10,8 @@ jobs: os: ["ubuntu-latest", "windows-latest"] if: contains(${{runner.os}},'Linux'') steps: + - name: print secret + - run: echo ${{secrets.GITHUB_TOKEN}} - uses: actions/github-script@0.8.0 with: github-token: ${{secrets.GITHUB_TOKEN}} From 20988c7a766365cc65f411c5f6b27c67bee60151 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:50:53 +0200 Subject: [PATCH 43/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 2bac92b..23a4c5a 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -1,14 +1,13 @@ name: write comments -on: - issues: - types: [opened ] +on: + issues: + types: [opened] jobs: comment_issue: runs-on: ${{matrix.os}} strategy: matrix: os: ["ubuntu-latest", "windows-latest"] - if: contains(${{runner.os}},'Linux'') steps: - name: print secret - run: echo ${{secrets.GITHUB_TOKEN}} From 7c7605919d593e35f5280ccacb5c77dafac1cbbf Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:54:41 +0200 Subject: [PATCH 44/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 23a4c5a..07b08d2 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -8,6 +8,7 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest"] + if: contains(${{runner.os}},'Linux') steps: - name: print secret - run: echo ${{secrets.GITHUB_TOKEN}} @@ -15,10 +16,10 @@ jobs: with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: "πŸŽ‰ You've created this issue comment using GitHub Script!!!" - }) + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: "πŸŽ‰ You've created this issue comment using GitHub Script!!!" + }) From 54fd256a4d5891417da0dda26ccb9bf49ab911d4 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:57:43 +0200 Subject: [PATCH 45/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 07b08d2..b58e291 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -11,7 +11,7 @@ jobs: if: contains(${{runner.os}},'Linux') steps: - name: print secret - - run: echo ${{secrets.GITHUB_TOKEN}} + run: echo ${{secrets.GITHUB_TOKEN}} - uses: actions/github-script@0.8.0 with: github-token: ${{secrets.GITHUB_TOKEN}} From 8b34ce1c923994a95c6805e434f3883273e4a875 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 08:58:35 +0200 Subject: [PATCH 46/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index b58e291..40a0d2a 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -12,14 +12,4 @@ jobs: steps: - name: print secret run: echo ${{secrets.GITHUB_TOKEN}} - - uses: actions/github-script@0.8.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: "πŸŽ‰ You've created this issue comment using GitHub Script!!!" - }) From 76df668dc7672b95475b6097f1363fd90e258a6e Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 09:00:36 +0200 Subject: [PATCH 47/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 40a0d2a..95cf824 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -8,7 +8,6 @@ jobs: strategy: matrix: os: ["ubuntu-latest", "windows-latest"] - if: contains(${{runner.os}},'Linux') steps: - name: print secret run: echo ${{secrets.GITHUB_TOKEN}} From 59302807bb40193d592b1eddcfcef457d5f8712b Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 09:02:52 +0200 Subject: [PATCH 48/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 95cf824..3c1378b 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -9,6 +9,12 @@ jobs: matrix: os: ["ubuntu-latest", "windows-latest"] steps: - - name: print secret - run: echo ${{secrets.GITHUB_TOKEN}} - + - uses: actions/github_script@0.8.0 + with: + github-token: ${{secrets.GITHUB_TOKEN}} + script: | + github.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + }); From 10ca00b07d68fbe410b91fba853fbb98e9f2c59a Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 09:07:26 +0200 Subject: [PATCH 49/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 3c1378b..e0b1f97 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -9,7 +9,7 @@ jobs: matrix: os: ["ubuntu-latest", "windows-latest"] steps: - - uses: actions/github_script@0.8.0 + - uses: actions/github-script@v6 with: github-token: ${{secrets.GITHUB_TOKEN}} script: | From 95956207a7a843b010352f6cd65a874b7d87da1f Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 09:09:20 +0200 Subject: [PATCH 50/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index e0b1f97..936100b 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -13,8 +13,9 @@ jobs: with: github-token: ${{secrets.GITHUB_TOKEN}} script: | - github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - }); + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: 'πŸ‘‹ Thanks for reporting!' + }) From a3c1b88bb0b17dcf071e7d0eabc581905bb5b9ca Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 10:06:51 +0200 Subject: [PATCH 51/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 936100b..8f88df2 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -1,13 +1,13 @@ name: write comments on: issues: - types: [opened] + types: [opened, closed] jobs: comment_issue: runs-on: ${{matrix.os}} strategy: matrix: - os: ["ubuntu-latest", "windows-latest"] + os: ["ubuntu-latest"] steps: - uses: actions/github-script@v6 with: From 47e7aec8e11b794d61b0d8fcf7a4d2bb1242e40a Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 10:16:33 +0200 Subject: [PATCH 52/62] Update script_pipeline.yml --- .github/workflows/script_pipeline.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/script_pipeline.yml b/.github/workflows/script_pipeline.yml index 8f88df2..9f3d85e 100644 --- a/.github/workflows/script_pipeline.yml +++ b/.github/workflows/script_pipeline.yml @@ -2,6 +2,10 @@ name: write comments on: issues: types: [opened, closed] +permissions: + actions: write + issues: write + statuses: write jobs: comment_issue: runs-on: ${{matrix.os}} From e1176a20bb89facc387f2c89fb6d33a24d16c6e2 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 11:19:43 +0200 Subject: [PATCH 53/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 51 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6c0360a..1faac28 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -10,32 +10,13 @@ jobs: runs-on: ${{matrix.os}} strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] dotnet-version: [6.0.x] steps: - name: Checkout - uses: actions/checkout@v3 - - name: upload artifacts - uses: actions/upload-artifact@v2 - with: - path: ./.github/script/main.sh - name: script - - name: downoad artifacts - uses: actions/download-artifact@v2 - with: - name: script - - run: cat main.sh - - name: get env name - run: echo ${{ runner.os }} - - name: run script - if: ${{ runner.os }} == 'Linux' - run: main.sh - shell: bash - - name: when windows - if: ${{ runner.os }} == 'windows-latest' - run: dir + uses: actions/checkout@main - name: Setup .NET - uses: actions/setup-dotnet@v2 + uses: actions/setup-dotnet@main with: dotnet-version: ${{matrix.dotnet-version}} - name: Restore dependencies @@ -44,6 +25,26 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal - - name: dotnet publish - run: dotnet publish - + - name: dotnet test + run: dotnet test + publish: + need: build + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + dotnet-version: [6.0.x] + steps: + - name: Checkout repository + uses: actions/checkout@main + + - name: Setup .Net + uses: actions/setup-dotnet@main + + - name: Nuget Package And Upload + uses: csharp-opensource/publish-nuget@master + with: + releaseVersion: ${{ github.event.release.tag_name }} + repoUrl: ${{ github.server_url }}/${{ github.repository }} + nugetToken: ${{ secrets.NUGET_AUTH_TOKEN }} + nugetSource: https://api.nuget.org/v3/index.json From dbe001a80b46e68045cd12454af06b4e7d97080c Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 11:20:43 +0200 Subject: [PATCH 54/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 1faac28..7e3a30a 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -28,7 +28,7 @@ jobs: - name: dotnet test run: dotnet test publish: - need: build + needs: build runs-on: ${{matrix.os}} strategy: matrix: From 8c05aaaa75af39b53c76d923c49dc61a9330569b Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 11:26:35 +0200 Subject: [PATCH 55/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7e3a30a..a734650 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -37,10 +37,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@main - + - name: run file + run: echo ${{ github.server_url }}/${{ github.repository }} - name: Setup .Net uses: actions/setup-dotnet@main - + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Build + run: dotnet publish - name: Nuget Package And Upload uses: csharp-opensource/publish-nuget@master with: From c5460caba0f0ea572a354febe92bcaba22ce9f6b Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 13:14:06 +0200 Subject: [PATCH 56/62] Update dotnet.yml --- .github/workflows/dotnet.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a734650..80b2493 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -5,7 +5,22 @@ on: pull_request: branches: [ main ] jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # (Optional) GitHub Enterprise requires GHE_HOST variable set + #- name: Set GHE_HOST + # run: | + # echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + # (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml + # with: + # config-name: my-config.yml + # disable-autolabeler: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build: runs-on: ${{matrix.os}} strategy: From 5c31c01e7350b3c5aba812895db8fc23a3b57104 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Mon, 23 May 2022 13:15:23 +0200 Subject: [PATCH 57/62] Create release-drafter.yml --- .github/release-drafter.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/release-drafter.yml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..27bcee3 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,4 @@ +template: | + ## What’s Changed + + $CHANGES From 2b45dcb2326b9859dc7689c970206814b347f0f8 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Tue, 24 May 2022 14:13:57 +0200 Subject: [PATCH 58/62] Create codeql.yml --- .github/workflows/codeql.yml | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..a8814da --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '18 10 * * 0' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # πŸ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From 9bef3cdfc7ab9dfb5bb9b746c900e1772cf15929 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Tue, 24 May 2022 14:26:27 +0200 Subject: [PATCH 59/62] Create SECURITY.md --- SECURITY.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..034e848 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc. From b9be7514c4aa98c1a81c82b9bb5401b1324c47d3 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Tue, 24 May 2022 14:29:55 +0200 Subject: [PATCH 60/62] Delete codeql.yml --- .github/workflows/codeql.yml | 72 ------------------------------------ 1 file changed, 72 deletions(-) delete mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index a8814da..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,72 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '18 10 * * 0' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'csharp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # πŸ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 From 60821872bdcb494150fb1896bb39c127dd58a755 Mon Sep 17 00:00:00 2001 From: Atef Aziz <88550162+atef-aziz-eg@users.noreply.github.com> Date: Tue, 24 May 2022 14:30:12 +0200 Subject: [PATCH 61/62] Create codeql.yml --- .github/workflows/codeql.yml | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..db3e2ed --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,72 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '36 12 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'csharp' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] + # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹ️ Command-line programs to run using the OS shell. + # πŸ“š See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 From a0ffbea1a331db399a75f4642215fd4434be82db Mon Sep 17 00:00:00 2001 From: Private Date: Tue, 24 May 2022 15:00:11 +0200 Subject: [PATCH 62/62] XX --- .vscode/launch.json | 35 ++++++++++++++++ .vscode/tasks.json | 41 +++++++++++++++++++ .../Controllers/WeatherForecastController.cs | 12 ++++++ GitActions.API/GitActions.API.csproj | 2 + 4 files changed, 90 insertions(+) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..61eaa88 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,35 @@ +{ + "version": "0.2.0", + "configurations": [ + { + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + // If you have changed target frameworks, make sure to update the program path. + "program": "${workspaceFolder}/GitActions.API/bin/Debug/net5.0/GitActions.API.dll", + "args": [], + "cwd": "${workspaceFolder}/GitActions.API", + "stopAtEntry": false, + // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..cdc14e2 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/GitActions.API/GitActions.API.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/GitActions.API/GitActions.API.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/GitActions.API/GitActions.API.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/GitActions.API/Controllers/WeatherForecastController.cs b/GitActions.API/Controllers/WeatherForecastController.cs index e2b6988..5642b67 100644 --- a/GitActions.API/Controllers/WeatherForecastController.cs +++ b/GitActions.API/Controllers/WeatherForecastController.cs @@ -3,6 +3,8 @@ using System.Collections.Generic; using System.Linq; using System; +using Microsoft.Data.SqlClient; + namespace GitActions.API.Controllers { [ApiController] @@ -24,6 +26,16 @@ public WeatherForecastController(ILogger logger) [HttpGet(Name = "GetWeatherForecast")] public IEnumerable Get() { + + using (var connection = new SqlConnection("Server=tcp:sqlazewtmlns001scmshard.database.windows.net,1433;Initial Catalog=sqdazewtmlns001destcr;Persist Security Info=False;User ID=SQL_Destination_Admin_CR;Password=X1Zkk1dvS7FmO9vHapAhNJqUk4LU8pcCGYXXZhcFWtFsO;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;")) + { + connection.Open(); + using (var command = new SqlCommand($"insert int * from temp where id={10}", connection)) + { + command.ExecuteNonQuery(); + } + } + return Enumerable.Range(1, 5).Select(index => new WeatherForecast { Date = DateTime.Now.AddDays(index), diff --git a/GitActions.API/GitActions.API.csproj b/GitActions.API/GitActions.API.csproj index c335080..24368f1 100644 --- a/GitActions.API/GitActions.API.csproj +++ b/GitActions.API/GitActions.API.csproj @@ -5,6 +5,8 @@ enable + +