github action CICD 브랜치에서 테스트 하는 방법
증상
CICD를 개선하기 위해 새로운 브랜치를 생성하고 yml 파일을 생성했지만,
레포지터리의 actions 탭에는 내가 작성한 워크플로우 파일이 보이지 않았다...

워크플로우에는 main 브랜치에 있는 github_action.yml 의 워크플로우만 보였다...
아니 그러면 CICD를 테스트 할 때는 main 브랜치에서만 작업을 해야한다는 말인가?
놀랍게도 그게 맞았다...
다른 브랜치에서 테스트 하기 위해서는 아래와 같이 curl로 요청을 날려야만한다...
깃랩에서는 브랜치 별로 빌드 지원이 됬었는데
깃허브는 그게 안된다....
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OWNER/REPO/actions/workflows/WORKFLOW_FILE_NAME/dispatches \
-d '{"ref":"test-branch","inputs":{"deploy-environment":"dev","image-tag":"latest"}}'
Reference
GitHub workflow workflow_dispatch missing in actions tab
I created a workflow file and the workflow is not showing up in the GitHub actions tab name: AZ Deploy Workflow on: workflow_dispatch: inputs: deploy-environment: descrip...
stackoverflow.com
Workflow is not shown so I cannot run it manually (Github Actions)
I created the workflow Test but there is no Run workflow button to run it manually. This is my test.yml file. Is there anything missing? name: Test on: release: types: [created] jobs: ...
stackoverflow.com