الملفات
github-actions-demos/slides/Slides.md
2023-04-25 23:13:37 +00:00

4.5 KiB
خام اللوم التاريخ

marp, theme, footer, style
marp theme footer style
true default @Chris_L_Ayers - https://chris-ayers.com .columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; } .columns3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } .ci { width: 800px; } .cd { width:960px; } @import 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css'

CI/CD with GitHub Actions

bg


bg left:40%

Chris Ayers

Senior Customer Engineer
Microsoft

Twitter: @Chris_L_Ayers Mastodon: @Chrisayers@hachyderm.io LinkedIn: - chris-l-ayers Blog: https://chris-ayers.com/ GitHub: Codebytes


bg left

Agenda

  • YAML
  • CI / CD
  • Actions Overview
  • Demos

bg

YAML

Yet Another Markup Language

GitHub uses YAML for workflows

Demo: Online Parser

Feature Description
Lists Start with a
Key-Value Key: value
Objects Objects:
Properties of objects

bg

What is CI/CD?

flowchart LR subgraph Continuous Integration direction LR A[Code] --Check In--> B[Build] B --Auto--> C[Unit Tests] C --Auto--> D[Dev Release] D --Auto--> E[Additional Tests] end
flowchart LR subgraph Continuous Delivery direction LR G[Code] --Check In--> H[Build] H --Auto--> I[Unit Tests] I --Auto--> J[Dev Release] J --Auto--> K[Additional Tests] K --Manual--> L[Release] end linkStyle 4 color:red;
flowchart LR subgraph Continuous Deployment direction LR M[Code] --Check In--> N[Build] N --Auto--> O[Unit Tests] O --Auto--> P[Dev Release] P --Auto--> Q[Additional Tests] Q --Auto--> R[Release] end linkStyle 4 color:gree;

bg

Actions Overview

  • Actions are Event Driven
  • Live in the .github/workflows folder
  • Workflows are defined in YAML

bg right:60% w:700

Workflows

  • Events trigger workflows
  • Workflows contain jobs
  • Jobs contain steps
  • Steps are commands or actions
flowchart LR Event --> Job --> Step1[Step] --> Action1[Action] Job --> Shell1[Shell Command] Job --> Step2[Step] --> Action2[Action]

bg right:60% w:750

Jobs

  • Workflows can contain multiple jobs
  • Each job runs on a Runner

ACT

Run Actions Locally

nektos/act

bg right:50% contain


bg

DEMOS


Questions

bg auto bg


Resources

<script type="module"> import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs'; mermaid.initialize({ startOnLoad: true }); </script>