Skip to content

Latest commit

 

History

History
205 lines (163 loc) · 3.23 KB

intro_github_actions.md

File metadata and controls

205 lines (163 loc) · 3.23 KB
title author
Introduction to GitHub Actions
Part 1 of 3 in the [Build end-to-end CI/CD capabilities directly in GitHub](https://github.com/MSUSDEV/end-to-end-github-actions) series

Introduction to GitHub Actions

Overview

About us

Presenter Name

☁️ Presenter Title

For questions or help with this series: [email protected]

All demos and source code available online:

https://github.com/msusdev/end-to-end-github-actions

Setting the scene

Series roadmap

  • Session 1:
    • ↪️ Introduction to GitHub Actions
  • Session 2:
    • Continuous integration using GitHub Actions
  • Session 3:
    • Deploy applications to Azure using GitHub Actions

Agenda

  1. Learning the syntax
  2. Building a simple project

Getting hands-on with GitHub Actions

Demo: Learning the syntax

::: notes

on: push
on: push
jobs:
  first-job:
on: push
jobs:
  first-job:
    steps:
      - run: node --version
      - run: npm --version
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    steps:
      - run: node --version
      - run: npm --version
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    container: node:12.18.4
    steps:
      - run: node --version
      - run: npm --version
name: Test Node with Workflow
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    container: node:12.18.4
    steps:
      - run: node --version
      - run: npm --version
name: Test Node with Workflow
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    container: node:12.18.4
    steps:
      - run: node --version
      - run: npm --version
      - run: npm install
name: Test Node with Workflow
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    container: node:12.18.4
    steps:
      - run: node --version
      - run: npm --version
      - uses: actions/checkout@v2
name: Test Node with Workflow
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    container: node:12.18.4
    steps:
      - run: node --version
      - run: npm --version
      - uses: actions/checkout@v2
      - run: npm install
name: Test Node with Workflow
on: push
jobs:
  first-job:
    runs-on: ubuntu-latest
    container: node:12.18.4
    steps:
      - run: node --version
      - run: npm --version
      - uses: actions/checkout@v2
      - run: npm install
      - run: node index.js

:::

Demo: Building a simple project

::: notes

npm init --force
npm install --save-dev moment
touch index.js
{
  "name": "app",
  "version": "1.0.0",
  "main": "index.js",
  "devDependencies": {
    "moment": "^2.29.1"
  }
}
var moment = require('moment');
var date = moment().format('LL');
console.log(date);
node_modules/
package-lock.json

:::

Review

Agenda (revisted)

  1. Learning the syntax
  2. Building a simple project
  3. GitHub Lab

Links

GitHub Lab

https://lab.github.com/msusdev/build-end-to-end-cicd-capabilities-directly-in-github

Thanks! Q&A