프로젝트 & TIL/일별 공부 기록 (백엔드 스쿨)
72일차 - 깃허브 액션(Github Actions)
yurison
2023. 6. 5. 11:47
깃허브 액션(Github Actions)
- 1개의 리포지터리 > 여러 개의 브랜치, 여러 개의 워크플로우 파일들
- 1개의 워크플로우 파일 > 여러 개의 잡, 발동 조건
- 1개의 잡 > 여러 개의 스탭
새 리포지터리 생성 후
아래와 같이 github.com/~ 를 github.dev/~로 바꾸거나, creating a new file을 클릭한다.
.github/workflows 경로를 설정하고 이름.yml 파일을 생성한다.
파일 내용
name: work-1 # 맘대로 지정하면 됨
on:
push:
branches:
- main # main에 커밋, 푸시되면 깃허브 액션이 실행된다.
jobs:
hello1: # jobs 이름
runs-on: ubuntu-latest
steps:
- name:
run: # 리눅스 명령어
- name:
run: # 리눅스 명령어
내용 입력 후 Commit Changes를 실행하면(main 브랜치) 깃허브 액션이 실행된다.
workflow를 각각 클릭해보면 상세 내용을 확인할 수 있다.
각각의 job을 하나씩 재실행할 수도 있다.
GitHub Actions
Automate your GitHub workflows. GitHub Actions has 58 repositories available. Follow their code on GitHub.
github.com
비공식 문서(사용자들이 만듦)
https://github.com/marketplace?type=actions
GitHub Marketplace: actions to improve your workflow
Find the actions that help your team build better, together.
github.com