$30 off During Our Annual Pro Sale. View Details »

Continuous Delivery with GitHub Actions - DeliveryConf 2020

sullis
January 21, 2020

Continuous Delivery with GitHub Actions - DeliveryConf 2020

Continuous Delivery with GitHub Actions
DeliveryConf
January 21, 2020
Seattle Washington
#GitHubActions
#DeliveryConf

sullis

January 21, 2020
Tweet

More Decks by sullis

Other Decks in Technology

Transcript

  1. Continuous Delivery
    with GitHub Actions
    DeliveryConf 2020 - Sean Sullivan

    View Slide

  2. About me

    View Slide

  3. View Slide

  4. Agenda
    CI/CD
    GitHub Actions
    Core concepts
    Security

    View Slide

  5. CI/CD

    View Slide

  6. “The most important practice for
    continuous integration
    to work properly is
    frequent check-ins to trunk”

    View Slide

  7. “Continuous integration
    was first written about
    in Kent Beck’s book
    Extreme Programming Explained”

    View Slide

  8. View Slide

  9. GITHUB
    ACTIONS

    View Slide

  10. “GitHub Actions help
    you automate your
    software development
    workflows”
    source: GitHub.com

    View Slide

  11. “You can write
    individual tasks, called
    actions, and combine
    them to create a
    custom workflow”
    source: GitHub.com

    View Slide

  12. Getting started

    View Slide

  13. Actions tab

    View Slide

  14. Actions tab
    Starter Workflow

    View Slide

  15. Workflow editor

    View Slide

  16. Workflow editor

    View Slide

  17. Workflow editor

    View Slide

  18. Workflow editor
    checkout@v2

    View Slide

  19. Workflow editor
    setup-java@v1

    View Slide

  20. Workflow editor
    run: sbt test

    View Slide

  21. Workflow editor
    click

    View Slide

  22. Workflow editor
    click

    View Slide

  23. .github/workflows

    View Slide

  24. Actions tab

    View Slide

  25. Actions tab

    View Slide

  26. Actions tab

    View Slide

  27. Ruby On Rails
    uses
    GitHub Actions

    View Slide

  28. Ruby on Rails

    View Slide

  29. Ruby on Rails

    View Slide

  30. Ruby on Rails

    View Slide

  31. Ruby on Rails

    View Slide

  32. Core concepts

    View Slide

  33. Events Actions
    Workflows

    View Slide

  34. create
    deployment
    deployment_status
    issue created
    pull_request
    push
    schedule
    label created
    (and many more)
    Events trigger workflows

    View Slide

  35. Workflows are custom
    automated processes
    that you can set up in
    your repository to
    build, test, package,
    release, or deploy
    source: GitHub.com

    View Slide

  36. GitHub
    webhooks
    GitHub
    Actions
    workflows

    View Slide

  37. Actions are individual
    tasks that you can
    combine to create jobs
    source: GitHub.com

    View Slide

  38. You can create custom
    Actions or use Actions
    provided by the GitHub
    community
    source: GitHub.com

    View Slide

  39. action.yml
    declares the inputs
    and outputs for
    an action
    source: GitHub.com

    View Slide

  40. Types of Actions:
    JavaScript
    Docker
    source: GitHub.com

    View Slide

  41. “GitHub Actions is
    available with
    GitHub Free, GitHub
    Pro, GitHub Team, and
    GitHub Enterprise
    Cloud”
    source: GitHub.com

    View Slide

  42. What if I
    already have an
    existing CI tool
    enabled?

    View Slide

  43. Keep your
    existing CI tool
    and enable
    GitHub Actions

    View Slide

  44. Evaluate both
    CI tools
    running
    side-by-side

    View Slide

  45. Actions runtime
    Runners
    Virtual Environments

    View Slide

  46. Runners
    GitHub-hosted
    Self-hosted

    View Slide

  47. Hosted Runners
    “GitHub hosts Linux and Windows
    runners on Standard_DS2_v2 virtual
    machines in Microsoft Azure with
    the GitHub Actions runner
    application installed”
    source: GitHub.com

    View Slide

  48. Self-Hosted Runners
    “Self-hosted runners can be
    physical, virtual, container,
    on-premises, or in a cloud”
    source: GitHub.com

    View Slide

  49. Self-Hosted Runners

    View Slide

  50. Self-Hosted Runners
    C Sharp

    View Slide

  51. Virtual Environments

    View Slide

  52. Ubuntu 18.04
    Ubuntu 16.04
    Linux support

    View Slide

  53. Third party
    actions

    View Slide

  54. AWS Actions
    Azure Actions
    Google Cloud Actions

    View Slide

  55. Pulumi Actions
    Terraform Actions
    Twilio SMS Action

    View Slide

  56. https://github.com/aws-actions

    View Slide

  57. View Slide

  58. AWS: action.yml

    View Slide

  59. Security

    View Slide

  60. Secrets
    access protected
    keys using the
    secrets context
    object
    source: GitHub.com

    View Slide

  61. Secrets
    source: GitHub.com

    View Slide

  62. Secrets
    source: GitHub.com

    View Slide

  63. Secrets
    source: GitHub.com

    View Slide

  64. Secrets
    source: GitHub.com

    View Slide

  65. Self-Hosted Runners
    “do not use self-
    hosted runners with
    public repositories”
    source: GitHub.com

    View Slide

  66. Self-Hosted Runners
    “Forks of your public
    repository can potentially
    run dangerous code on
    your self-hosted runner
    machine”
    source: GitHub.com

    View Slide

  67. Final thoughts

    View Slide

  68. “CI ensures that the code that we
    create, as a team, works by providing
    us with rapid feedback
    on any problems”

    View Slide

  69. “However, CI is not enough”

    View Slide

  70. “end-to-end automation
    of our build, deploy, test,
    release processes”

    View Slide

  71. GitHub Actions
    End-to-end pipeline
    Deploy with confidence
    Conclusion

    View Slide

  72. Thank you
    twitter.com/tinyrobots
    github.com/sullis

    View Slide

  73. Bonus slides

    View Slide

  74. View Slide

  75. THE
    END

    View Slide