Skip to content

Commit

Permalink
refactor: Update CD workflow to include workflow_dispatch for environ…
Browse files Browse the repository at this point in the history
…ment inputs and all branches
  • Loading branch information
crinconpcln committed Sep 12, 2024
1 parent 3edefff commit 1b73288
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
name: CD
on:
workflow_run:
workflows: ["CI"] # Nombre del workflow CI
types:
- completed
branches: [main, develop]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
Expand All @@ -16,6 +18,7 @@ jobs:
name: Apply Terraform
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'development' }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: CI
on:
push:
Expand Down

0 comments on commit 1b73288

Please sign in to comment.