728x90
이놈의 Workflow가 하나의 Commit의 일부이다 보니까, 여기저기 Branch에서 조건만 맞으면 돌아간다..
Tag조건이 원래 아래와 같은데 이게 문제가.. Branch안따지고 걍 Tag push하면 돌아간다는거다..
on:
push:
tags:
- 'v*'
그래서 Tag를 붙이는 Target이랑 같이 And 조건을 걸면 훨씬 안정적인데, 이게 쉽지 않다. 결국 Release condition으로 가야한다.
on:
workflow_dispatch:
release:
types: [published]
jobs:
deploy:
if: github.event.release.target_commitish == 'prod'
uses: ./.github/workflows/deploy-application.yaml
if조건으로 target에 대한 필터를 걸어준다. 그러면 target branch가 다르면 실행되다 만다.
'PaaS > CI CD' 카테고리의 다른 글
Gitlab-CI) AWS CLI 사용을 위한 인증 방법 (0) | 2024.03.11 |
---|---|
Github Actions) 나의 Github 계정에서 수행된 Actions History를 모두 수집해보자 (1) | 2024.03.03 |
Github Actions) 성능제고를 위한 방안 cache (0) | 2024.02.20 |
Github Actions) AutoScaling Runner Controller 아키텍처 설명 (0) | 2024.01.28 |
Github Actions) Github-hosted와 self-hosted runner의 차이점 (0) | 2024.01.03 |