728x90
반응형
push & pull-request 알림 workflow 만들기
github actions → using workflow 로 가서 어떻게 사용하는지 확인한다.
workflow 작성
# lesson1.yml
name: lesson1
on:
push:
pull_request:
jobs:
echo-event:
name: echo event
runs-on: ubuntu-latest
steps:
- name: get event
run: echo "This event is ${{github.event_name}}"
push 를 하면 github actions 에 해당 내용들이 기록되어진다.
이번에는 pull-request 를 확인해보자
dev branch 를 파서 새롭게 업데이트 한 후 push 를 하면,
dev_django_app % git push origin dev
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 451 bytes | 451.00 KiB/s, done.
..
* [new branch] dev -> dev
github 에 pull request 가 생겨나는데, 이부분을 클릭해서 들어가서 보면 dev → main 으로 요청이 오픈되어 있는 것을 확인 할 수 있다.
이대로 actions 로 들어가서 내용을 확인하면 기존에 있는 #3 이 보이지만
"This event is push"
머지가 완료된 이후에는 #4 를 확인할 수 있다.
"This event is pull_request"
728x90
반응형
'Dev. > Github Actions' 카테고리의 다른 글
[Cloud] CD: Github Actions - Mutiple workflow (0) | 2023.08.23 |
---|---|
[Cloud] CD: Github Actions - 환경변수, docker-compose (0) | 2023.08.21 |
[Cloud] CD: Github Actions - ssh, git pull (0) | 2023.08.19 |
[Cloud] CD: Github Actions - docker build (0) | 2023.08.18 |
[Cloud] CD: Continuous Deployment (feat. github actions) (0) | 2023.08.17 |
댓글