Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix : add trigger pull_request #20

Merged
merged 2 commits into from
May 30, 2024
Merged

fix : add trigger pull_request #20

merged 2 commits into from
May 30, 2024

Conversation

gbwlxhd97
Copy link
Contributor

@gbwlxhd97 gbwlxhd97 commented May 30, 2024

๐ŸŽซ [์ง€๋ผ ํ‹ฐ์ผ“ ๋ฒˆํ˜ธ] - ์—†์Œ

์›์ธ

์ž‘์—…์„ ํ•˜๋˜ ๋„์ค‘ ์ข…์ข… pr์Šน์ธ ํ›„ main ๋ธŒ๋žœ์น˜์— ๋ณ‘ํ•ฉ๋˜์—ˆ์ง€๋งŒ
์‹ค์ œ prod ํ™˜๊ฒฝ์—์„œ build ์‹คํŒจ ์—๋Ÿฌ๊ฐ€ ์ข…์ข… ๊ฒ€์ถœ๋˜๊ณค ํ•ฉ๋‹ˆ๋‹ค.
๋”ฐ๋ผ์„œ main ๋ธŒ๋žœ์น˜๋กœ pull request์ผ๋•Œ CI ๊ฒ€์‚ฌ ํ›„
์‹คํŒจํ•˜๋ฉด PR ์Šน์ธ์„ ๋ถˆํ—ˆ ํ•˜์˜€๊ณ 
๊ทธ์— ๋”ฐ๋ผ์„œ github ActionํŒŒ์ผ์„ ๋‘ ๊ฐœ๋กœ ๋‚˜๋ˆด์Šต๋‹ˆ๋‹ค.

trigger๋ฅผ main ๋ธŒ๋žœ์น˜์˜ push, pull-request๋กœ
pr์ƒํƒœ๋Š” build์™€ ์ถ”ํ›„ lint,test code๊นŒ์ง€ ํ™•์ธ ํ•˜๋Š” ์šฉ๋„์ธ ci.yml
prํ›„ ๋ณ‘ํ•ฉ์ƒํƒœ๋Š” build ํ›„ s3์— deployํ•˜๋Š” ํ˜•์‹์œผ๋กœ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ—’๏ธ Note (optional)

main ๋ธŒ๋žœ์น˜๋กœ pull request์ผ๋•Œ CI ๊ฒ€์‚ฌ ํ›„
์‹คํŒจํ•˜๋ฉด PR ์Šน์ธ์„ ๋ถˆํ—ˆ ํ•˜์˜€๊ณ 
์œ„ ๊ณผ์ •์€

  1. GitHub ๋ฆฌํฌ์ง€ํ† ๋ฆฌ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
  2. Settings ํƒญ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  3. Branches ๋ฉ”๋‰ด๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.
  4. Branch protection rules ์„น์…˜์—์„œ Add rule ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  5. Branch name pattern์— main์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  6. Require status checks to pass before merging ์˜ต์…˜์„ ํ™œ์„ฑํ™”ํ•ฉ๋‹ˆ๋‹ค.
  7. ์ƒ์„ฑ๋œ GitHub Actions ์›Œํฌํ”Œ๋กœ์šฐ ์ €ํฌ jobs์ด๋ฆ„์€ -> build-and-test
    8.Create ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜์—ฌ ๊ทœ์น™์„ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค.

์ด๋ ‡๊ฒŒ ํ–ˆ์Šต๋‹ˆ๋‹ค!

@gbwlxhd97 gbwlxhd97 requested a review from VictoryJu May 30, 2024 01:28
@gbwlxhd97
Copy link
Contributor Author

gbwlxhd97 commented May 30, 2024

@emibgo2 action ํ›ˆ์ง€๋‹˜์ด ์ž‘์„ฑํ•ด์ฃผ์‹  ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์—
์ œ๊ฐ€ ์ˆ˜์ •ํ•œ ์ฝ”๋“œ์—
ํ˜น์—ฌ๋‚˜ ๋ฌธ์ œ๊ฐ€ ์žˆ์„๊นŒ ๋ฆฌ๋ทฐ์š”์ฒญ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
๊ฒ€ํ† ํ›„ ๋ฌธ์ œ์—†๋‹ค๋ฉด
์„œ๋ฒ„์ชฝ์—๋„ ์ ์šฉํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

before : ci/cd trggier git event.push
after: create ci.yml create deploy.yml
@gbwlxhd97
Copy link
Contributor Author

ํ›ˆ์ง€๋‹˜ ๊ฒ€ํ† ํ›„์—
ํ•˜๋‚˜์˜ ymlํŒŒ์ผ์„
ci/cd ๊ฐ๊ฐ ๋ถ„๋ฆฌํ•˜์˜€์Šต๋‹ˆ๋‹ค

on:
push:
branches:
- main
pull_request:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๋ถ€๋ถ„์ด pr ์˜ฌ๋ผ์™”์„๋•Œ actions์ด ์‹คํ–‰๋˜๋Š”๋ถ€๋ถ„์ด๊ตฐ์š”

@VictoryJu
Copy link
Contributor

VictoryJu commented May 30, 2024

@gbwlxhd97 ์ €๋Š” ํ™•์ธ ์™„๋ฃŒํ•˜์˜€์Šต๋‹ˆ๋‹ค! @emibgo2 ์ง€ํ›ˆ๋‹˜ ๊ฒ€ํ† ํ›„ ์ด์ƒ์—†์œผ๋ฉด ๋จธ์ง€ํ•ป๋ ๊ฒƒ๊ฐ™์Šต๋‹ˆ๋‹ค.

Copy link
Contributor

@emibgo2 emibgo2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@VictoryJu VictoryJu merged commit 6ce2dd9 into main May 30, 2024
1 check passed
@VictoryJu VictoryJu deleted the fix-YML branch May 30, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants