Skip to content

Commit

Permalink
added if expression for each env
Browse files Browse the repository at this point in the history
  • Loading branch information
shashi2504 authored Jan 7, 2025
1 parent 9004da8 commit 1e51984
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/solar-system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jobs:
ghcr.io/${{ github.repository_owner }}/solar-system:${{ github.sha }}
dev-deploy:
if: contains(github.ref, 'feature/')
name: Deploying Application to the Development Env Production
needs: [docker]
environment:
Expand Down Expand Up @@ -232,6 +233,7 @@ jobs:
echo "APP_INGRESS_HOST=$(kubectl get ingress -n ${{ vars.NAMESPACE }} -o jsonpath="{.items[0].spec.tls[0].hosts[0]}")" >> "$GITHUB_OUTPUT"
dev-integration-testing:
if: contains(github.ref, 'feature/')
name: Dev Integration testing
needs: dev-deploy
runs-on: ubuntu-latest
Expand All @@ -246,8 +248,9 @@ jobs:
continue-on-error: true

prod-deploy:
if: github.ref == 'refs/heads/main'
name: Deploying Application to the Production Env
needs: [dev-integration-testing]
needs: docker
environment:
name: production
url: https://${{ steps.set-ingress-host-address.outputs.APP_INGRESS_HOST }}
Expand Down Expand Up @@ -316,6 +319,7 @@ jobs:
echo "APP_INGRESS_HOST=$(kubectl get ingress -n ${{ vars.NAMESPACE }} -o jsonpath="{.items[0].spec.tls[0].hosts[0]}")" >> "$GITHUB_OUTPUT"
production-integration-testing:
if: github.ref == 'refs/heads/main'
name: Production Integration testing
needs: prod-deploy
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1e51984

Please sign in to comment.