티스토리 뷰
집에 있는 desktop 에서 프로그램 이것저것 실행하고 있어요.
코드 변경사항 있을 때 마다 빌드하고 배포하는 게 번거로워서 desktop 에 self-hosted runner 를 설치하기로 해요.
하나의 runner 로 여러 repository 에서 사용할 수 있을 줄 알았는데 각 repository 마다 새로운 runner 를 만들어야 하는 것 같아요.
근데 organization 은 self-hosted runner 설정을 해두면 runner 를 여러 repository 에서 공유할 수 있다고 하네요.
organization 을 하나 만들고 여기에 runner 가 필요한 repository 들을 넣어서 쓰기로 해요.
진행
desktop (Ubuntu 22.04) 에 설치하기에 문제없는 것 같아요.
- https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#linux
문서 따라 진행하니 잘 설치됐어요.
- https://docs.github.com/en/actions/hosting-your-own-runners
.github/workflows 에 원하는 workflow 를 .yml 파일에 작성해요.
- https://docs.github.com/en/actions/using-workflows/about-workflows
name: Desktop route-kingsubin workflow
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: "~/bin/build-route-kingsubin"
stop:
needs: build
runs-on: self-hosted
steps:
- name: Stop the Docker image
run: "~/bin/stop-route-kingsubin"
run:
needs: stop
runs-on: self-hosted
steps:
- name: Run the Docker image
run: "~/bin/start-route-kingsubin"
조건으로 걸어둔 main branch 에 push 해서 돌아가는지 확인해 보니 잘 돌아가네요.
actions 문서에 이것저것 많은 것 같은데 요즘에는 cloud build 를 써서 볼 일이 없네요.
desktop 에서도 지금은 trigger 걸어둘 만한 프로젝트가 하나뿐인데 organization 도 만들었으니 뭐라도 더 올려야겠어요.

'DevOps' 카테고리의 다른 글
GCP Monitoring Mattermost Notification (0) | 2023.05.12 |
---|---|
ubuntu server 설정 (3) | 2023.04.09 |
AWS GCP 도메인 이전 (0) | 2023.01.04 |
Google Cloud Translation API detect confidence (0) | 2022.09.24 |
AWS 정적 웹 사이트 배포 과정 (1) | 2022.01.11 |
- Total
- Today
- Yesterday
- 김영한 http
- 모던자바스크립트
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- js promise
- dreamcoding
- JPA 연관관계 매핑
- JS 딥다이브
- js api
- 프로그래머스
- 이펙티브자바 아이템59
- js array
- http
- 패스트캠퍼스 컴퓨터공학 완주반
- 킹수빈닷컴
- Spring Security
- GCP
- 백준
- 드림코딩
- 백기선 스터디
- REST API
- 이펙티브자바 스터디
- 이펙티브자바
- 김영한 JPA
- HTTP 완벽가이드
- 프로그래머스 SQL
- 이펙티브자바 아이템60
- BOJ
- java
- 집 구하기
- HTTP 완벽 가이드
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |