From a15e4e053cd9d1ad4763d88489829c03fd7781ed Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:07:27 +0900 Subject: [PATCH 01/20] Create test-and-build.yml --- .github/test-and-build.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/test-and-build.yml diff --git a/.github/test-and-build.yml b/.github/test-and-build.yml new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/.github/test-and-build.yml @@ -0,0 +1 @@ + From 3ed608289901c48e75e1103705186060cf480520 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:15:23 +0900 Subject: [PATCH 02/20] Update test-and-build.yml --- .github/test-and-build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/test-and-build.yml b/.github/test-and-build.yml index 8b137891..e60c4b4d 100644 --- a/.github/test-and-build.yml +++ b/.github/test-and-build.yml @@ -1 +1,14 @@ +name: Node build and test +on : [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - users: actions/checkout@v2 + - name: npm install and build + run: | + npm install + npm run build --if-present + npm test \ No newline at end of file From 0996634201480336e31cfe3c30daefb9ffb6bc89 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:19:14 +0900 Subject: [PATCH 03/20] Create node.js.yml --- .github/workflows/node.js.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 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 00000000..05a9a9c7 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +# This workflow will do a clean install of node dependencies, 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: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x, 15.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test From 8c10b05286658ce17554e29560bb1e7c5b4bb0f2 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:25:10 +0900 Subject: [PATCH 04/20] init workflow --- .github/{ => workflows}/test-and-build.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/test-and-build.yml (100%) diff --git a/.github/test-and-build.yml b/.github/workflows/test-and-build.yml similarity index 100% rename from .github/test-and-build.yml rename to .github/workflows/test-and-build.yml From 05573fe2d0db5f0e0f12b8897a983f5bcc0cfe77 Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:39:10 +0900 Subject: [PATCH 05/20] 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 00000000..034e8480 --- /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 5a6f4493f817521b11dd2b6c480cc445eab41228 Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:45:16 +0900 Subject: [PATCH 06/20] Update SECURITY.md --- SECURITY.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SECURITY.md b/SECURITY.md index 034e8480..480f505f 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -19,3 +19,6 @@ 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. + + +add XXX comment(policy test). From fc07f178d7ac5329909ef3a4228350b2fa0d43e7 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:47:14 +0900 Subject: [PATCH 07/20] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e02cd858..8e526a3f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ ## Welcome +## Hellow This repository contains the base project part of our on-site GitHub Verified Partner workshop program. It is meant to be used for in-classroom training under the supervision of GitHub coaches. From ddfbeeb2af1ea10b3957bcee737ab4ccbff9da88 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 15:57:12 +0900 Subject: [PATCH 08/20] upd --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e526a3f..5e21ebaf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ ## Welcome -## Hellow +## Hellow 2 This repository contains the base project part of our on-site GitHub Verified Partner workshop program. It is meant to be used for in-classroom training under the supervision of GitHub coaches. From fa83e6ad01676fb84418eec2e532be6eb220526e Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 16:39:38 +0900 Subject: [PATCH 09/20] Update utils.test.js --- test/utils.test.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/utils.test.js b/test/utils.test.js index be1803c5..2352e9fd 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -11,10 +11,14 @@ var mochaAsync = fn => { describe("Utils", function() { describe("greetings", function() { - it("Says Hello World", function() { - assert.equal(utils.greetings("World"), "Hello World 👋👋"); + it("Says Hello World", function () { + assert.equal(utils.greetings("World"), "test"); }); + // it("Says Hello World", function () { + // assert.equal(utils.greetings("World"), "Hello World 👋👋"); + // }); + it("Throws on missing params", function() { assert.throws(() => { utils.greetings(); From 6a0139586e00f635dcf172994af564dcb5417091 Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:06:43 +0900 Subject: [PATCH 10/20] Update utils.test.js --- test/utils.test.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/utils.test.js b/test/utils.test.js index 2352e9fd..625cc1c8 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -15,16 +15,16 @@ describe("Utils", function() { assert.equal(utils.greetings("World"), "test"); }); - // it("Says Hello World", function () { - // assert.equal(utils.greetings("World"), "Hello World 👋👋"); - // }); - - it("Throws on missing params", function() { - assert.throws(() => { - utils.greetings(); - }, Error); + it("Says Hello World", function () { + assert.equal(utils.greetings("World"), "Hello World 👋👋"); }); + //it("Throws on missing params", function() { + // assert.throws(() => { + // utils.greetings(); + // }, Error); + //}); + it("Throws on empty string", function() { assert.throws(() => { utils.greetings(""); From 0e851918f310ac9100f9a834637696fe2769f7fc Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:09:26 +0900 Subject: [PATCH 11/20] Update utils.test.js --- test/utils.test.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/utils.test.js b/test/utils.test.js index 625cc1c8..9107113c 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -11,19 +11,19 @@ var mochaAsync = fn => { describe("Utils", function() { describe("greetings", function() { - it("Says Hello World", function () { - assert.equal(utils.greetings("World"), "test"); - }); + //it("Says Hello World", function () { + //assert.equal(utils.greetings("World"), "test"); + //}); it("Says Hello World", function () { assert.equal(utils.greetings("World"), "Hello World 👋👋"); }); - //it("Throws on missing params", function() { - // assert.throws(() => { - // utils.greetings(); - // }, Error); - //}); + it("Throws on missing params", function() { + assert.throws(() => { + utils.greetings(); + }, Error); + }); it("Throws on empty string", function() { assert.throws(() => { From e6465cb0969bcf6cf9d0ef3c68759cb1803d8260 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 17:32:07 +0900 Subject: [PATCH 12/20] Create azure.yml --- .github/workflows/azure.yml | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/azure.yml diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml new file mode 100644 index 00000000..58423811 --- /dev/null +++ b/.github/workflows/azure.yml @@ -0,0 +1,49 @@ +# This workflow will build and push a node.js application to an Azure Web App when a release is created. +# +# This workflow assumes you have already created the target Azure App Service web app. +# For instructions see https://docs.microsoft.com/azure/app-service/app-service-plan-manage#create-an-app-service-plan +# +# To configure this workflow: +# +# 1. For Linux apps, add an app setting called WEBSITE_WEBDEPLOY_USE_SCM and set it to true in your app **before downloading the file**. +# For more instructions see: https://docs.microsoft.com/azure/app-service/configure-common#configure-app-settings +# +# 2. Set up a secret in your repository named AZURE_WEBAPP_PUBLISH_PROFILE with the value of your Azure publish profile. +# For instructions on obtaining the publish profile see: https://docs.microsoft.com/azure/app-service/deploy-github-actions#configure-the-github-secret +# +# 3. Change the values for the AZURE_WEBAPP_NAME, AZURE_WEBAPP_PACKAGE_PATH and NODE_VERSION environment variables (below). +# +# For more information on GitHub Actions for Azure, refer to https://github.com/Azure/Actions +# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples +on: + release: + types: [created] + +env: + AZURE_WEBAPP_NAME: your-app-name # set this to your application's name + AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root + NODE_VERSION: '10.x' # set this to the node version to use + +jobs: + build-and-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v1 + with: + node-version: ${{ env.NODE_VERSION }} + - name: npm install, build, and test + run: | + # Build and test the project, then + # deploy to Azure Web App. + npm install + npm run build --if-present + npm run test --if-present + - name: 'Deploy to Azure WebApp' + uses: azure/webapps-deploy@v2 + with: + app-name: ${{ env.AZURE_WEBAPP_NAME }} + publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From 4bb499189fda43fd73aea6871ee9b28836064b5b Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:01:46 +0900 Subject: [PATCH 13/20] Update azure.yml --- .github/workflows/azure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml index 58423811..bc0a263d 100644 --- a/.github/workflows/azure.yml +++ b/.github/workflows/azure.yml @@ -20,9 +20,9 @@ on: types: [created] env: - AZURE_WEBAPP_NAME: your-app-name # set this to your application's name - AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root - NODE_VERSION: '10.x' # set this to the node version to use + AZURE_WEBAPP_NAME: Github4 # set this to your application's name + AZURE_WEBAPP_PACKAGE_PATH: 'https://github4.azurewebsites.net' # set this to the path to your web app project, defaults to the repository root + NODE_VERSION: '14.*' # set this to the node version to use jobs: build-and-deploy: From f0c97c077dc3d342f9c974bb744829783bde451b Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:31:33 +0900 Subject: [PATCH 14/20] Add or update the App Service deployment workflow configuration from Azure Portal. --- .github/workflows/master_github4(dev).yml | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/master_github4(dev).yml diff --git a/.github/workflows/master_github4(dev).yml b/.github/workflows/master_github4(dev).yml new file mode 100644 index 00000000..37a53ecc --- /dev/null +++ b/.github/workflows/master_github4(dev).yml @@ -0,0 +1,35 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy Node.js app to Azure Web App - github4(dev) + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + with: + app-name: 'github4' + slot-name: 'dev' + publish-profile: ${{ secrets.AzureAppService_PublishProfile_d5b1dbab2209482bb34e21c5c829a1bf }} + package: . \ No newline at end of file From 4d49fdbef8acde565768d390b1e0adad2d588316 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:34:08 +0900 Subject: [PATCH 15/20] Update master_github4(dev).yml --- .github/workflows/master_github4(dev).yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_github4(dev).yml b/.github/workflows/master_github4(dev).yml index 37a53ecc..bb4811f5 100644 --- a/.github/workflows/master_github4(dev).yml +++ b/.github/workflows/master_github4(dev).yml @@ -4,7 +4,7 @@ name: Build and deploy Node.js app to Azure Web App - github4(dev) on: - push: + pull_request: branches: - master From 1e8425a03ac74fe1851b1e568059ee1f85d1a4fa Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 18:54:38 +0900 Subject: [PATCH 16/20] Add or update the App Service deployment workflow configuration from Azure Portal. --- .github/workflows/master_github4.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/master_github4.yml diff --git a/.github/workflows/master_github4.yml b/.github/workflows/master_github4.yml new file mode 100644 index 00000000..2230ea07 --- /dev/null +++ b/.github/workflows/master_github4.yml @@ -0,0 +1,35 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy Node.js app to Azure Web App - github4 + +on: + push: + branches: + - master + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Set up Node.js version + uses: actions/setup-node@v1 + with: + node-version: '14.x' + + - name: npm install, build, and test + run: | + npm install + npm run build --if-present + npm run test --if-present + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v2 + with: + app-name: 'github4' + slot-name: 'production' + publish-profile: ${{ secrets.AzureAppService_PublishProfile_a797a18d20784f84a16d14870e6fd662 }} + package: . \ No newline at end of file From dced2052825dcee7f9b5db72baa59f30a02e7fe8 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 19:00:24 +0900 Subject: [PATCH 17/20] upd workflow --- .github/workflows/master_github4(dev).yml | 2 +- .github/workflows/master_github4.yml | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master_github4(dev).yml b/.github/workflows/master_github4(dev).yml index bb4811f5..92b58035 100644 --- a/.github/workflows/master_github4(dev).yml +++ b/.github/workflows/master_github4(dev).yml @@ -1,7 +1,7 @@ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy # More GitHub Actions for Azure: https://github.com/Azure/actions -name: Build and deploy Node.js app to Azure Web App - github4(dev) +name: Build and deploy Dev on: pull_request: diff --git a/.github/workflows/master_github4.yml b/.github/workflows/master_github4.yml index 2230ea07..c4a5332b 100644 --- a/.github/workflows/master_github4.yml +++ b/.github/workflows/master_github4.yml @@ -1,14 +1,19 @@ # Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy # More GitHub Actions for Azure: https://github.com/Azure/actions -name: Build and deploy Node.js app to Azure Web App - github4 +name: Build and deploy Product on: - push: + pull_request: branches: - master + types: [closed] jobs: + tag: + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true + build-and-deploy: runs-on: ubuntu-latest From 5a39284d339ef4c14c2be6b41b48aa1ceffa0e14 Mon Sep 17 00:00:00 2001 From: jssrshun <69140371+jssrshun@users.noreply.github.com> Date: Tue, 12 Jan 2021 19:04:32 +0900 Subject: [PATCH 18/20] Update index.pug --- views/index.pug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/index.pug b/views/index.pug index e7d469fe..b1897e5b 100644 --- a/views/index.pug +++ b/views/index.pug @@ -10,7 +10,7 @@ html a(href="#") Docs a(href="#") About main.wrap - h1 Hello 🌎! + h1 Hello 🌎! I love ramen hr p This is our Tonkotsu 🍜 NodeJS webapp. You can find instructions inside the repository. pre #{zen.msg} From 619ec720710cd2a91eaeccf63cb2574ecc570be8 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 19:18:02 +0900 Subject: [PATCH 19/20] Update master_github4.yml --- .github/workflows/master_github4.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master_github4.yml b/.github/workflows/master_github4.yml index c4a5332b..b36e5498 100644 --- a/.github/workflows/master_github4.yml +++ b/.github/workflows/master_github4.yml @@ -10,7 +10,7 @@ on: types: [closed] jobs: - tag: + job: runs-on: ubuntu-latest if: github.event.pull_request.merged == true From 173a98d478b45c399c845a83b220a5ccd0346a87 Mon Sep 17 00:00:00 2001 From: Kondo <64765659+rykon3007@users.noreply.github.com> Date: Tue, 12 Jan 2021 19:20:34 +0900 Subject: [PATCH 20/20] Revert "Update s azure.yml" --- .github/workflows/azure.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml index bc0a263d..58423811 100644 --- a/.github/workflows/azure.yml +++ b/.github/workflows/azure.yml @@ -20,9 +20,9 @@ on: types: [created] env: - AZURE_WEBAPP_NAME: Github4 # set this to your application's name - AZURE_WEBAPP_PACKAGE_PATH: 'https://github4.azurewebsites.net' # set this to the path to your web app project, defaults to the repository root - NODE_VERSION: '14.*' # set this to the node version to use + AZURE_WEBAPP_NAME: your-app-name # set this to your application's name + AZURE_WEBAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root + NODE_VERSION: '10.x' # set this to the node version to use jobs: build-and-deploy: