Slide 1

Slide 1 text

ϞϊϨϙͷϓϧϦΫΤετʹ ࠷ۙɺಋೖͨ͠΋ͷ 2024.6.3 YUMEMI.grow ϓϧϦΫΤετͱίʔυϨϏϡʔͰ։ൃΛՃ଎ͤ͞ΔLTձ Hiroyuki Kusu ( @hkusu_ )

Slide 2

Slide 2 text

About me

Slide 3

Slide 3 text

લఏɿ͜ͷεϥΠυͰͷϞϊϨϙͷఆٛ • 1ͭͷϦϙδτϦʹෳ਺ͷαϒγεςϜͷίʔυ͕ଘࡏ • গͳ͘ͱ΋͜ͷεϥΠυͰ͸͜ͷΑ͏ʹఆٛ • γϯϓϧʹαϒγεςϜຖʹσΟϨΫτϦ͕ผͱ͠·͢

Slide 4

Slide 4 text

1. ࣗಈͰϨϏϡΞΛઃఆ

Slide 5

Slide 5 text

/server @server-team /front @front-team ... 1. ࣗಈͰϨϏϡΞΛઃఆ .github/CODEOWNERS

Slide 6

Slide 6 text

2. ඞཁͳαϒγεςϜͷΈ࣮ߦ

Slide 7

Slide 7 text

- uses: yumemi-inc/path-filter@v2 with: patterns: | front/** !front/doc/** run: | cd front/ npm run test 2. ඞཁͳαϒγεςϜͷΈ࣮ߦ ྫɿϓϧϦΫͰ front/ ഑Լͷίʔυ͕มߋ͞Ε͍ͯΔ৔߹ͷΈςετΛ࣮ߦ ※ ϫʔΫϑϩʔؙ͝ͱ࣮ߦ͢Δ/͠ͳ͍ͷ੍ޚͰΑ͍৔߹͸ϫʔΫϑϩʔͷτϦΨʔ৚݅ͷ paths Ͱ΋Α͍Ͱ͢

Slide 8

Slide 8 text

2. ඞཁͳαϒγεςϜͷΈ࣮ߦ https://github.com/marketplace/actions/path- fi lter ར༻͍ͯ͠Δ actionɿ

Slide 9

Slide 9 text

2. ඞཁͳαϒγεςϜͷΈ࣮ߦ • ͕͔͔࣌ؒΔςετ΍ϏϧυΛεϧʔ͢ΔͷʹޮՌత • ෆཁͳσϓϩΠ΋๷ࢭ͢Δ͜ͱ͕ग़དྷΔ

Slide 10

Slide 10 text

3. ࣗಈͰϓϧϦΫʹϥϕϧΛ෇༩

Slide 11

Slide 11 text

3. ࣗಈͰϓϧϦΫʹϥϕϧΛ෇༩ • ͲͷαϒγεςϜͷϓϧϦΫͳͷ͔ͷϥϕϧ͕͍͍ͭͯΔͱ෼͔Γ΍͍͢ • ͨͩखಈͰϥϕϧΛ෇༩͢Δͷ͸໘౗ͩ͠ɺؒҧ͑ΔՄೳੑ

Slide 12

Slide 12 text

env: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ github.token }} steps: - uses: yumemi-inc/path-filter@v2 with: patterns: 'server/**' run: gh pr edit ${{ github.event.number }} --add-label 'server' run-if-not: gh pr edit ${{ github.event.number }} --remove-label 'server' - uses: yumemi-inc/path-filter@v2 with: patterns: 'front/**' run: gh pr edit ${{ github.event.number }} --add-label 'front' ɹ run-if-not: gh pr edit ${{ github.event.number }} --remove-label ‘front' … 3. ࣗಈͰϓϧϦΫʹϥϕϧΛ෇༩ ※ actions/labeler ͕αϙʔτ͍ͯ͠ͳ͍৚݅Ͱ΋ϥϕϧ෇͚Ͱ͖ΔΑ͏͜͏͍ͯ͠·͢

Slide 13

Slide 13 text

4. ϒϥϯν໊ͷνΣοΫ

Slide 14

Slide 14 text

4. ϒϥϯν໊ͷνΣοΫ • ϞϊϨϙʹ͓͍ͯ͸ɺ௨ৗͷ git- fl ow ౳ͷϒϥϯνʹՃ͑ͯɺαϒγες Ϝ༻ͷϒϥϯνΛ࡞ͬͨΓ pre fi x Λ͚ͭͨΓ͕ͪ͠ʢݸਓతͳ؍ଌʣ • ྫɿ feature/server/hogeɺhot fi x/front/fuga • .. ͓ͷͣͱϒϥϯνͷӡ༻ϧʔϧ͸ෳࡶͱͳΔͷͰػցతʹνΣοΫ

Slide 15

Slide 15 text

- name: Fail if head branch name is invalid if: |- !( github.head_ref == 'develop' || startsWith(github.head_ref, 'feature/server/') || startsWith(github.head_ref, 'feature/front/') || ... ) uses: yumemi-inc/comment-pull-request@v1 with: comment: | Head branch name is invalid. fail: true 4. ϒϥϯν໊ͷνΣοΫ ϓϧϦΫʹίϝϯτͭͭ͠ϫʔΫϑϩʔΛམͱ͢ ※ ࣮ࡍͷӡ༻Ͱ͸ head ϒϥϯνຖͷ base ϒϥϯν໊ͷνΣοΫʢ޲͖ઌ͕ਖ਼͍͔͠ʣ΋͍ͯ͠·͢

Slide 16

Slide 16 text

4. ϒϥϯν໊ͷνΣοΫ https://github.com/marketplace/actions/comment-pull-request-for-work fl ow ར༻͍ͯ͠Δ actionɿ

Slide 17

Slide 17 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ

Slide 18

Slide 18 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ ͋Δػೳ a ͷϓϧϦΫʹɺαϒγεςϜ bɺc ͷϓϧϦΫؚ͕·ΕΔέʔε ʢػೳ a ͷ࣮ݱʹ͸ɺෳ਺ͷαϒγεςϜΛލͬͨίʔυͷमਖ਼͕ඞཁͳ৔߹ʣ feature/a ← feature/sub_b ͷϓϧϦΫ feature/a ← feature/sub_c ͷϓϧϦΫ develop ← feature/a ͷϓϧϦΫ Ϛʔδ Ϛʔδ

Slide 19

Slide 19 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ develop ← feature/a ͷϓϧϦΫʹίϝϯτ

Slide 20

Slide 20 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ - name: List associated pull request numbers uses: yumemi-inc/associated-pull-requests@v1 id: associated-pr with: format: 'markdown' merge-commit-only: false - name: Comment if: steps.associated-pr.outputs.numbers != null uses: yumemi-inc/comment-pull-request@v1 with: comment: | ### pull requests merged into this pull request: ${{ steps.associated-pr.outputs.numbers }} previous-comment: 'hide' Ϛʔδͷӡ༻࣍ୈ͕ͩ false ͷํ͕औΓ͜΅͕͠ແ҆͘ṛ ʢͨͩίϛοτཤྺ͕௕͍৔߹͸͕͔͔࣌ؒΔʣ

Slide 21

Slide 21 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ https://github.com/marketplace/actions/associated-pull-requests ར༻͍ͯ͠Δ actionɿ

Slide 22

Slide 22 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ • ϦϦʔε༻ͷϓϧϦΫͰɺϦϦʔεʹؚ·ΕΔϓϧϦΫͷҰཡΛίϝϯτ ͢ΔΑ͏ͳ࢖͍ํ΋Ͱ͖Δ

Slide 23

Slide 23 text

5. αϒɾϓϧϦΫΤετҰཡΛίϝϯτ https://zenn.dev/yumemi_inc/articles/3ed5a217cf3cbb

Slide 24

Slide 24 text

6. Bitrise ͷϫʔΫϑϩʔΛ GitHub Actions Ͱ࣮ߦ

Slide 25

Slide 25 text

6. Bitrise ͷϫʔΫϑϩʔΛ GitHub Actions Ͱ࣮ߦ - uses: yumemi-inc/path-filter@v2 id: filter with: patterns: 'ios/**' - if: steps.filter.outputs.exists == 'true' uses: p-mazhnik/bitrise-run-build@v1 with: bitrise-app-slug: 'your-app-slug' bitrise-token: ${{ secrets.YOUR_TOKEN }} bitrise-workflow: 'your-workflow-name' listen: true skip-git-status-report: true - if: failure() ... ྫ͑͹αϒγεςϜ͏ͪ iOS ͸ Bitrise ͰϏϧυ͢Δɺͱ͍͏έʔε ݁ՌΛ଴ͬͯ࣍ͷ step Λ࣮ߦͰ͖Δʂ

Slide 26

Slide 26 text

6. Bitrise ͷϫʔΫϑϩʔΛ GitHub Actions Ͱ࣮ߦ https://github.com/marketplace/actions/bitrise-build-runner ར༻͍ͯ͠Δ actionɿ

Slide 27

Slide 27 text

6. Bitrise ͷϫʔΫϑϩʔΛ GitHub Actions Ͱ࣮ߦ • Bitrise ͷϫʔΫϑϩʔΛ GitHub Actions ͷ 1 step ͱͯ͠૊ΈࠐΊΔͷ Ͱͱͯ΋ศར

Slide 28

Slide 28 text

Thank you ! @hkusu_ ฐࣾ͸ Android ΤϯδχΞΛ ઈࢍืूத Ͱ͢ʂ