From 5ddfe8ce11d7ee0ce424ab0594740efeab1378d6 Mon Sep 17 00:00:00 2001 From: Blaize Date: Tue, 18 Aug 2020 13:24:46 -0400 Subject: [PATCH 1/7] Create node.js.yml Add action workflow --- .github/workflows/node.js.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..673bd331 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# 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] + + 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 c9d0de812911b6db205ea03a477d28bbafed1a0d Mon Sep 17 00:00:00 2001 From: Blaize Date: Tue, 18 Aug 2020 13:26:12 -0400 Subject: [PATCH 2/7] Update index.js Trigger a CI test --- index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.js b/index.js index 4c7e0b60..1f637b60 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,8 @@ const server = require("server"); const chalk = require("chalk"); const ora = require("ora"); +//Do something! + const { error, get } = server.router; const { render, status } = server.reply; From f47d1419c02477b654fe4242ab8b788232cb31bc Mon Sep 17 00:00:00 2001 From: Dave Baskin Date: Tue, 18 Aug 2020 13:41:51 -0400 Subject: [PATCH 3/7] Just messing with it. (#1) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e02cd858..c5d89466 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ## Welcome +Dave was here!! + 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. This is the NodeJS version of our "Tonkotsu" workshop webapp. The codebase is pretty simple: it's a NodeJS app that will connect to GitHub's [Octocat API endpoint](https://api.github.com/octocat) and return the Zen quote of the day. E.g.: From ffaac55f34a2b71c75b6c7c7bea1776b7aa50e22 Mon Sep 17 00:00:00 2001 From: Ken Muse Date: Tue, 18 Aug 2020 14:06:55 -0400 Subject: [PATCH 4/7] Updated my hearing --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c5d89466..d80f929c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,9 @@ This repository contains the base project part of our on-site GitHub Verified Pa This is the NodeJS version of our "Tonkotsu" workshop webapp. The codebase is pretty simple: it's a NodeJS app that will connect to GitHub's [Octocat API endpoint](https://api.github.com/octocat) and return the Zen quote of the day. E.g.: +Ken was waaaaay over here + + ### Demo (sucess) ![out](https://user-images.githubusercontent.com/1078545/57860397-bc7ff380-77ec-11e9-80f8-39e02ef3c035.gif) From 59c60aaf731d7c980be55a6d5f18c0315489aa98 Mon Sep 17 00:00:00 2001 From: Ken Muse Date: Tue, 18 Aug 2020 14:13:43 -0400 Subject: [PATCH 5/7] Removed reference to Ken Working on #4 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d80f929c..a2188f93 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This repository contains the base project part of our on-site GitHub Verified Pa This is the NodeJS version of our "Tonkotsu" workshop webapp. The codebase is pretty simple: it's a NodeJS app that will connect to GitHub's [Octocat API endpoint](https://api.github.com/octocat) and return the Zen quote of the day. E.g.: -Ken was waaaaay over here +~~Ken was waaaaay over here~~ ### Demo (sucess) From 1978904708da2cbd901ea8a6913982fa461aa543 Mon Sep 17 00:00:00 2001 From: Blaize Date: Tue, 18 Aug 2020 14:38:20 -0400 Subject: [PATCH 6/7] Create azure.yml CD action --- .github/workflows/azure.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 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..ffd8c969 --- /dev/null +++ b/.github/workflows/azure.yml @@ -0,0 +1,46 @@ +# 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. 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 +# +# 2. 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: [pull_request] + +env: + AZURE_WEBAPP_NAME: githubdevops # 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: '12.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 }} + creds: ${{ secrets.AZURE_CREDENTIALS }} + package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }} From a5aa41c04bf324fa02acd142f0f8a9b9db6a983f Mon Sep 17 00:00:00 2001 From: Blaize Date: Tue, 18 Aug 2020 14:48:44 -0400 Subject: [PATCH 7/7] Update azure.yml --- .github/workflows/azure.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/azure.yml b/.github/workflows/azure.yml index ffd8c969..004f3754 100644 --- a/.github/workflows/azure.yml +++ b/.github/workflows/azure.yml @@ -15,6 +15,8 @@ on: release: types: [pull_request] + +# change env: AZURE_WEBAPP_NAME: githubdevops # set this to your application's name