cs107-lecture-examples

Example codes used during Harvard CS107 lectures
git clone https://git.0xfab.ch/cs107-lecture-examples.git
Log | Files | Refs | README | LICENSE

lecture14_intro.yml (1330B)


      1 # This is a basic workflow to help you get started with Actions
      2 # You find out more at: https://docs.github.com/en/actions
      3 name: Lecture14 Continuous Integration Introduction
      4 
      5 # Controls when the workflow will run
      6 on:
      7   # Triggers the workflow on push or pull request events but only for the main
      8   # branch
      9   push:
     10     branches:
     11       - main
     12   pull_request:
     13     branches:
     14       - main
     15 
     16   # Allows you to run this workflow manually from the Actions tab
     17   workflow_dispatch:
     18 
     19 # A workflow run is made up of one or more jobs that can run sequentially or in
     20 # parallel. For more on jobs:
     21 # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobs
     22 jobs:
     23   # This workflow contains a job called "bash_command"
     24   bash_command:
     25 
     26     # The type of runner that the job will run on
     27     runs-on: ubuntu-latest
     28 
     29     steps:
     30       - name: Bash commands
     31         run: echo "Hello CI!"
     32 
     33   # another job called "bash_script"
     34   bash_script:
     35 
     36     # The type of runner that the job will run on
     37     runs-on: ubuntu-latest
     38 
     39     steps:
     40       # Check out your repository under $GITHUB_WORKSPACE (job needs access to
     41       # it) See: https://github.com/actions/checkout
     42       - uses: actions/checkout@v3 # uses a GitHub action
     43       - name: Bash script
     44         run: ./script.sh # must be executable and in repository root