Upgrade to Pro — share decks privately, control downloads, hide ads and more …

10分で分るGitHub Actions

5df67047ff8dd67c1f3b7e0f9b48c2ee?s=47 Takafumi Ikeda
February 21, 2019

10分で分るGitHub Actions

CI/CD Test Night

5df67047ff8dd67c1f3b7e0f9b48c2ee?s=128

Takafumi Ikeda

February 21, 2019
Tweet

Transcript

  1. None
  2. 10෼Ͱ෼͔Δ GitHub Actions 2019/02/21 ikeike443 Solutions Engineer, GitHub

  3. a ikeike443 Takafumi Ikeda Solutions Engineer

  4. 2008 GitHub introduced…

  5. Pull Request

  6. None
  7. None
  8. None
  9. None
  10. None
  11. ϫʔΫϑϩʔ͸ϞδϡϥʔԽ͞ΕΔ΂͖

  12. Actions

  13. Actions

  14. None
  15. workflow "My Workflow" { on = "event" resolves = ["Action

    2", "Action 3"] } action "Action 1" { uses = "user/repo@master" runs = "command" } action "Action 2" { uses = "docker://node:10-alpine" runs = "command" } action "Action 3" { needs = ["Action 1"] uses = ".github/actions/private.js" runs = "command" }
  16. None
  17. check_run check_suite commit_comment create delete deployment deployment_status 26 available events

  18. project_column public pull_request pull_request_review_comment pull_request_review push repository_dispatch release
 status watch

    26 available events
  19. GitHub Actionsͱ͸ • ίϯςφٕज़ϕʔε • ϫʔΫϑϩʔ as Code • ϫʔΫϑϩʔͷϞδϡϥʔԽɺ࠶ར༻

    • Pull Requestʹଓ͘ਐԽͷ৮ഔ
  20. None
  21. σϞ ࣮ࡍʹActionͱWorkflowΛ࡞ͬͯΈΑ͏ʂ

  22. Hello world

  23. खॱ • ActionΛ֨ೲ͢ΔϦϙδτϦΛ࡞੒ • ActionΛDockerfileͱͯ͠ఆٛ • ΤϯτϦʔϙΠϯτͱͳΔγΣϧεΫϦϓτΛఆٛ • ఆٛͨ͠ActionΛݺͼग़͢ϫʔΫϑϩʔΛఆٛ •

    ࣮ߦ
  24. ϦϙδτϦͷ༻ҙ

  25. Hello World Actionͷఆٛ

  26. ΤϯτϦʔϙΠϯτγΣϧεΫϦϓτ

  27. None
  28. Closer look ࠓݟͨ΋ͷͷղઆΛ͔Ͷͯ

  29. ࣮ߦ؀ڥʹ͍ͭͯ • Action࣮ߦ؀ڥʹ͍ͭͯ • 1 vcpu, 3.75 GB RAM •

    ωοτϫʔΫΞΫηεՄೳ • ϑΝΠϧγεςϜ΁ͷΞΫηεՄೳ • σΟεΫεϖʔε 100GB • ϫʔΫϑϩʔ಺Ͱڞ༗ͯ͠ΞΫηεͰ͖Δ • ؀ڥม਺ͷҾ͖౉͠Մೳ • ؀ڥม਺͸ϫʔΫϑϩʔ͝ͱͷίϯςΩετͰղऍ͞ΕΔ • GitHubʹΑͬͯ༧໿͞Ε͍ͯΔ؀ڥม਺͋Γ
  30. υΩϡϝϯτΛਵ࣌ࢀরͷ͜ͱ • ϕʔλதͷͨΊɺͲΜͲΜ௥ه͞Ε͍ͯ·͢

  31. ActionΛ࡞Δͷ͸؆୯ • جຊతʹ͸طଘͷπʔϧΛίϯςφԽ͢Δ͚ͩ • ͖Ε͍ʹ෦඼Խ͢Ε͹࠶ར༻͸͔ͳΓޮ͖΍͍͢

  32. ศརͳAction ͙͢ʹ໾ཱͪͦ͏ͳActionΛ঺հ

  33. ֤छΫϥ΢υActions • GCP, AWS, Azure, Heroku, Zeit, npm • https://github.com/actions

    ҎԼʹ͋Γ·͢
  34. actions/bin • جຊతͳ΋ͷΛఏڙ • bats • curl • debug •

    filter • sh • shellcheck
  35. HTTP client • HTTPie ϥούʔ • MarketplaceͰೖखՄ

  36. Add an issue reference • ϒϥϯν໊͔ΒIssueΛ ୳͠ग़ͯ͠ΫϩεϦϯΫ

  37. All in one project • Issue/PRΛৗʹProject΁ ௥Ճ

  38. Delete merged branch • ϚʔδࡁΈϒϥϯν࡟আ • Probot app/ActionsͲͪΒ Ͱ΋ར༻Մೳ

  39. Ϧιʔε ͜ͷ΁ΜݟͯΈͯͶ

  40. https://github.com/actions

  41. GitHub Marketplace

  42. https://github.com/sdras/awesome-actions

  43. Community Forum https://github.community/t5/tag/actions/tg-p/board-id/api

  44. ·ͱΊ GitHub Actions͕ݟΔະདྷ

  45. ϫʔΫϑϩʔ͸ࣗ༝ʹͳΔ • ϫʔΫϑϩʔ͸ϞδϡϥʔԽ͞Ε • OSSͱͯ͠օͰ࡞Γ্͍͛ͯ͘΋ͷʹͳΔͰ͠ΐ͏ • ιϑτ΢ΣΞ։ൃͷੈքʹ৽͍͠1ϖʔδΛ • Έͳ͞ΜͷࢀՃΛ଴͍ͬͯ·͢ʂ

  46. None
  47. None