Skip to content

Commit 7b7564d

Browse files
committed
feat: Only dispatch in main branch
1 parent f0d042d commit 7b7564d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/cd-prod.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ name: CD pipeline for prod environment
2222

2323
on:
2424
workflow_dispatch:
25+
branches:
26+
- main
2527

2628
jobs:
2729
check-stg-last-run:
@@ -37,7 +39,7 @@ jobs:
3739
const runs = await github.rest.actions.listWorkflowRuns({
3840
owner: context.repo.owner,
3941
repo: context.repo.repo,
40-
workflow_id: 'staging-deploy.yml', // nombre de tu workflow de staging
42+
workflow_id: 'cd-stg.yml', # name of stg workflow yml
4143
branch: 'main',
4244
per_page: 1
4345
});

.github/workflows/cd-stg.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ on:
1919
- main
2020

2121
workflow_dispatch:
22+
branches:
23+
- main
2224

2325
jobs:
2426
deploy-to-stg:

0 commit comments

Comments
 (0)