Skip to content

Commit

Permalink
refactor run tf to action
Browse files Browse the repository at this point in the history
  • Loading branch information
flokain committed Feb 14, 2025
1 parent 3fca188 commit 71e3cbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 178 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deploy-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
needs: [validate-aws-access, validate-terraform]
# For now let's make this the default environment to be triggered uppon a push/pr event
if: ${{ inputs.environment == 'development' || github.event_name == 'push' || github.event_name == 'pull_request' }}
uses: kununu/.github/.github/workflows/deploy_infrastructure.yaml@kundevops-2897-centralize-workflows
uses: kununu/.github/.github/actions/run-terraform-for-environment@kundevops-2897-centralize-workflows
with:
environment_name: 'development'
run_terraform_apply: ${{ inputs.run_terraform_apply || github.ref == 'refs/heads/main' || false }}
Expand All @@ -99,7 +99,7 @@ jobs:
name: Testing Env (Direct Trigger)
needs: [validate-aws-access, validate-terraform]
if: ${{ inputs.environment == 'test'}}
uses: kununu/.github/.github/workflows/deploy_infrastructure.yaml@kundevops-2897-centralize-workflows
uses: kununu/.github/.github/actions/run-terraform-for-environment@kundevops-2897-centralize-workflows
with:
environment_name: 'test'
run_terraform_apply: ${{ inputs.run_terraform_apply || github.ref == 'refs/heads/main' || false }}
Expand All @@ -108,22 +108,22 @@ jobs:
name: Testing Env
needs: [deploy-development]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: kununu/.github/.github/workflows/deploy_infrastructure.yaml@kundevops-2897-centralize-workflows
uses: kununu/.github/.github/actions/run-terraform-for-environment@kundevops-2897-centralize-workflows
with:
environment_name: 'test'
run_terraform_apply: ${{ inputs.run_terraform_apply || github.ref == 'refs/heads/main' || false }}

deploy-staging:
name: Staging Env
needs: [deploy-test]
uses: kununu/.github/.github/workflows/deploy_infrastructure.yaml@kundevops-2897-centralize-workflows
uses: kununu/.github/.github/actions/run-terraform-for-environment@kundevops-2897-centralize-workflows
with:
environment_name: 'staging'
run_terraform_apply: ${{ inputs.run_terraform_apply || github.ref == 'refs/heads/main' || false }}

deploy-production:
name: Production Env
needs: [deploy-staging]
uses: kununu/.github/.github/workflows/deploy_infrastructure.yaml@kundevops-2897-centralize-workflows
uses: kununu/.github/.github/actions/run-terraform-for-environment@kundevops-2897-centralize-workflows
with:
environment_name: 'production'
173 changes: 0 additions & 173 deletions .github/workflows/deploy_infrastructure.yaml

This file was deleted.

0 comments on commit 71e3cbe

Please # to comment.