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

熊でもわかるCI/CDモダンインフラ Github Action編

熊でもわかるCI/CDモダンインフラ Github Action編

先日の勉強会の資料です。

91f47c6a88734f521567938d2436b614?s=128

Shohei Kobayashi

May 29, 2022
Tweet

More Decks by Shohei Kobayashi

Other Decks in Programming

Transcript

  1. (JUIVC"DUJPOฤ NBJOʹQVTIʙ%PDLFS3FQPTJUPSZ·Ͱ ۽Ͱ΋Θ͔Δ$*$%ϞμϯΠϯϑϥ

  2. զ ΤϯδχΞྺɿ೥͘Β͍ ۀքɿ8FC͹͔ͬ ݴޠɿ3VCZͱ3BJMT೥ 1)11ZUIPO1FSM೥͘Β͍ʢ๨Ε͕ͪʣ Πϯϑϥ΍͖ͬͯͨྺʹΤϯδχΞྺ %/4αʔόͱ͔ϝʔϧαʔό࡞ͬͯ·ͨ͠ ࠷ۙ͸΋ͬͺΒ3BJMT࢖͍ͷϑϦʔϥϯεɻ ޷͖ͳ%/4αʔόͷϛυϧ΢ΣΞɿEKCEOT ޷͖ͳϝʔϧαʔόͷϛυϧ΢ΣΞɿ2NBJM

    ޷͖ͳ.Z42-ͷίϚϯυ͸TIPXTMBWFTUBUVT ޷͖ͳ"84ϓϩμΫτ͸&MBTUJD.BQ3FEVDF ޷͖ͳ($1ϓϩμΫτ͸$MPVESVO ޷͖ͳ$*$%πʔϧ͸(JUIVC"DUJPO &$4׬ᘳʹཧղͨ͠ কདྷͷເ͸ηΩϡϦςΟΤϯδχΞɻ
  3. $JSDMF$*͸͍͍ͧʂʂʂʂ

  4. ΍͍͖ͬͯ

  5. ܧଓతΠϯςάϨʔγϣϯ ࠓ೔΍Δͱ͜Ζ ܧଓతσϦόϦʔ ΠϯϑϥɾαʔόɾωοτϫʔΫ ΦϨϯδ৭ͷՕॴΛ΍Δπʔϧʹ͍ͭͯ ܧଓతσϓϩΠϝϯτ

  6. લճͷ͓͞Β͍ 1SPEVDUJPO؀ڥ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ ܧଓతΠϯςάϨʔγϣϯ ܧଓతσϦόϦʔ

    ܧଓతσϓϩΠϝϯτ
  7. લճͷ͓͞Β͍લఏͱ͢ΔΠϯϑϥ؀ڥ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB 71$ "NB[PO$MPVE'SPOU "84ࣗલͷ$%/ɻ ஋ஈʹԠͯ͡"LBNBJͱ͔ʹͳΔ͜ͱ΋͋Δ ҎԼͷߏ੒Λલఏͱͯ͠࿩ΛਐΊ·͢ɻ "NB[PO$MPVE'SPOU

    ϑϩϯτΤϯυ όοΫΤϯυ ֎෦͔ΒͷΞΫηε "NB[PO4 "NB[PO4 ੩తϑΝΠϧΛϗεςΟϯά͢Δͷʹ࢖ΘΕΔετʔϨδαʔϏεɻ ଱ٱੑ͸Ͱམͪͳ͍ͷͰɺΠϨϒϯφΠϯͱ͔ݺ͹ΕΔ "QQMJDBUJPO-PBE#BMBODFS "NB[PO&$4 3%4"VSPSB ϩʔυόϥϯαʔɻ ΞΫηεΛෳ਺ͷίϯςφʹৼΓ෼͚Δɻ %PDLFSίϯςφ࣮ߦ؀ڥɻ "84͕ఏڙ͍ͯ͠Δ3%#ͷ4BB4ɻ ޓ׵ੑ͕͋Δ͚ͩͰɺ.Z42-΍1PTUHSF42-ͱ͸શ͘ͷผ෺ɻ
  8. લճͷ͓͞Β͍ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB 3BJMTͷιʔείʔυద༻·Ͱ࣮ࡍʹ΍Δ͜ͱ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ

    ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ CVOEMFJOTUBMM SBJMTECDSFBUF SBJMTECNJHSBUF CVOEMFFYFDSTQFD CVOEMFFYFDCSBLFNBO CVOEMFFYFDSVCPDPQ EPDLFSCVJME EPDLFSUBH EPDLFSQVTI DELEFQMPZ
  9. $*$%πʔϧʹ͍ͭͯ

  10. લఏɿ$*$%ύΠϓϥΠϯͱ͸ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ΦϨϯδͷ֤εςοϓΛࣗಈԽͨ͠΋ͷΛ$*$%ύΠϓϥΠϯͱݺͼ·͢ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ

    ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ CVOEMFJOTUBMM SBJMTECDSFBUF SBJMTECNJHSBUF CVOEMFFYFDSTQFD CVOEMFFYFDCSBLFNBO CVOEMFFYFDSVCPDPQ EPDLFSCVJME EPDLFSUBH EPDLFSQVTI DELEFQMPZ
  11. $*$%πʔϧͱ͸ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB $*$%ύΠϓϥΠϯΛߏங͢ΔπʔϧΛ$*%πʔϧͱ͍͍·͢ɻ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ

    ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ CVOEMFJOTUBMM SBJMTECDSFBUF SBJMTECNJHSBUF CVOEMFFYFDSTQFD CVOEMFFYFDCSBLFNBO CVOEMFFYFDSVCPDPQ EPDLFSCVJME EPDLFSUBH EPDLFSQVTI DELEFQMPZ
  12. $*$%πʔϧͷϦετ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ੈʹ͋Δ$*$%πʔϧ "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ

    ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ
  13. $*$%πʔϧ஋ஈൺֱ ੈʹ͋Δ$*$%πʔϧ ύϒϦοΫϦϙδτϦ͸ແྉ ϓϥΠϕʔτϦϙδτϦ͸༗ྉ ࣌ؒͱετϨʔδɾ04ʹΑͬͯ՝ۚ Ϗϧυ࣌ؒ෼·Ͱ͸ແྉ ϓϥϯʹԠͯ͡ΧελϜՄೳ ࣌ؒͱϢʔβʹԠͯ͡՝ۚɻ

  14. $*Ͱ΍Δ࡞ۀ

  15. $*Ͱ΍Δϑϩʔجຊ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ։ൃ͸ࣗಈɾຊ൪͸࠷ऴεςοϓͷΈखಈ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ

    σϓϩΠ४උ σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ %FWFMPQNFOU 1SPEVDUJPO ։ൃ؀ڥ͸NBJOʹQVTIͱಉ࣌ʹσϓϩΠ·Ͱߦ͏ ຊ൪؀ڥ͸खಈͰσϓϩΠͷΈߦ͏ σϓϩΠ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
  16. $*Ͱ΍Δϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ຊ൪ͷσϓϩΠ४උ͸NBJOʹQVTI࣌ʹߦ͏ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ

    σϓϩΠ४උ σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ %FWFMPQNFOU 1SPEVDUJPO σϓϩΠ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ ͜ͷεςοϓͰຊ൪΁ͷ४උ΋ߦ͏
  17. $*Ͱ΍Δϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB σϓϩΠ४උͰߦ͏͜ͱ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ

    σϓϩΠ४උ σϓϩΠ %FWFMPQNFOU EPDLFSCVJME EPDLFSUBH EPDLFSQVTI EPDLFSCVJME EPDLFSUBH EPDLFSQVTI "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ
  18. $*Ͱ΍Δϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS σϓϩΠͰߦ͏͜ͱ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ

    σϓϩΠ "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ &$44FSWJDF5BTLVQEBUF &$45BTL%F fi OJUJPOVQEBUF NJHSBUJPO &$4ͷઃఆΛมߋ͢ΔͷͰ "84$%,΍5FSSBGPSNͰ ߦ͏͜ͱ͕ଟ͍Ͱ͢
  19. (JUIVC"DUJPO

  20. (JUIVC"DUJPO "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ੺࿮Λ(JUIVCͰͰ͖ΔΑ͏ʹఆٛ͢Δ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ

    σϓϩΠ४උ σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ %FWFMPQNFOU 1SPEVDUJPO σϓϩΠ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
  21. (JUIVC"DUJPOʹ͍ͭͯ ੈʹ͋Δ$*$%πʔϧ ύϒϦοΫϦϙδτϦ͸ແྉ ϓϥΠϕʔτϦϙδτϦ͸༗ྉ ࣌ؒͱετϨʔδɾ04ʹΑͬͯ՝ۚ HJUIVCσΟϨΫτϦΛ࡞ͬͯɺͦͷԼʹZBNMϑΝΠϧͰఆٛ (JUIVCͰߦ͏͜ͱ͸େମࣗಈԽͰ͖Δ ྫɿ13Λด͡Δ13΍JTTVFΛ։͍ͨΒࣗಈΞαΠϯFUDʜ

  22. (JUIVC"DUJPOʹ͍ͭͯ ઃఆϑΝΠϧ͸෼ׂ͢Δ͜ͱ͕Ͱ͖ΔʢجຊฒߦͰ࣮ߦ͞ΕΔ͕ґଘؔ܎࣋ͨͤΔ͜ͱ΋Ͱ͖Δʣ UFTUZBNM MJOUZBNM CSBLFNBOZBNM EFQMPZZBNM CVJMEZBNM QSDMPTFZBNM BVUPBTTJHOZBNM YAML

    YAML YAML YAML YAML YAML YAML
  23. (JUIVC"DUJPOʹ͍ͭͯ ࣮ߦ৚݅Λϒϥϯν͝ͱʹߦ͏ΞΫγϣϯΛ෼͚Δ͜ͱ΋Ͱ͖Δ શͯͷϒϥϯνͰߦ͏ NBJOʹNFSHF͞Εͨ࣌ͷΈߦ͏ 13ͷૢ࡞͕͞Εͨ࣌ͷΈߦ͏ 13͕DMPTF͞Εͨ࣌ͷΈߦ͏ UFTUZBNM MJOUZBNM CSBLFNBOZBNM EFQMPZZBNM

    CVJMEZBNM QSDMPTFZBNM BVUPBTTJHOZBNM YAML YAML YAML YAML YAML YAML YAML
  24. (JUIVC"DUJPO "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ͦΕͧΕͷεςοϓΛZBNMϑΝΠϧͰఆ͍ٛͯ͘͠ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ

    σϓϩΠ४උ σϓϩΠ UFTUZBNM MJOUZBNM CSBLFNBOZBNM EFQMPZZBNM CVJMEZBNM YAML YAML YAML YAML YAML
  25. ࣮ྫɿίʔυΈͳ͕Β࿩ͥ͢ ϒπΛݟͨํ͕ૣ͍

  26. ·ͱΊ σϓϩΠ $*πʔϧͰ։ൃʢεςʔδϯάʣ؀ڥ·Ͱ͸ࣗಈԽ ຊ൪͸λΠϛϯάΛଌΔͷͰϚχϡΞϧΦϖϨʔγϣϯ͢Δ͜ͱ͕ଟ͍ ʢձࣾʹΑͬͯ͸׬શʹࣗಈԽ͍ͯ͠Δͱ͜Ζ΋͋Γ·͢ʣ (JUIVC"DUJPO  (JUIVCͰ΍Δ͜ͱ͸େମࣗಈԽͰ͖Δ  ZBNMͰఆٛ͢Δ

     ઃఆϑΝΠϧ͸෼ׂͰ͖Δ  ϒϥϯν͝ͱʹλεΫΛ੾Γସ͑Ͱ͖Δ
  27. ࣍ճ༧ࠂ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS σϓϩΠίϚϯυʮDELEFQMPZʯʹ͍ͭͯ࿩ͥ͢ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ

    σϓϩΠ ʮDELEFQMPZʯ