Skip to content

Commit

Permalink
add environments
Browse files Browse the repository at this point in the history
  • Loading branch information
danielf-er committed Jul 4, 2024
1 parent e17fe8b commit 2829258
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
echo "tf_file_prod=environments/prod/integrations/${{ github.event.repository.name }}/terragrunt.hcl" >> $GITHUB_OUTPUT
build:
uses: PADAS/gundi-workflows/.github/workflows/build_docker.yml@v1-stable
uses: PADAS/gundi-workflows/.github/workflows/build_docker.yml@v2
needs: vars
with:
repository: ${{ needs.vars.outputs.repository }}
Expand All @@ -34,37 +34,41 @@ jobs:
service_account: ${{ vars.GUNDI_INTEGRATIONS_SERVICE_ACCOUNT }}

deploy_dev:
uses: PADAS/gundi-workflows/.github/workflows/update_hcl.yml@v1-stable
uses: PADAS/gundi-workflows/.github/workflows/update_hcl.yml@v2
if: startsWith(github.ref, 'refs/heads/main')
needs: [vars, build]
with:
git_repository: PADAS/gundi-integrations-v2-infra
file_location: ${{ needs.vars.outputs.tf_file_dev }}
key_name: image
new_value: "${{ needs.vars.outputs.repository }}:${{ needs.vars.outputs.tag }}"
environment: dev
secrets:
ssh-key: ${{ secrets.GUNDI_INTEGRATIONS_DEPLOY_KEY }}

deploy_stage:
uses: PADAS/gundi-workflows/.github/workflows/update_hcl.yml@v1-stable
uses: PADAS/gundi-workflows/.github/workflows/update_hcl.yml@v2
if: startsWith(github.ref, 'refs/heads/release')
needs: [vars, build]
with:
git_repository: PADAS/gundi-integrations-v2-infra
file_location: ${{ needs.vars.outputs.tf_file_stage }}
key_name: image
new_value: "${{ needs.vars.outputs.repository }}:${{ needs.vars.outputs.tag }}"
environment: stage
secrets:
ssh-key: ${{ secrets.GUNDI_INTEGRATIONS_DEPLOY_KEY }}

deploy_prod:
uses: PADAS/gundi-workflows/.github/workflows/update_hcl.yml@v1-stable
uses: PADAS/gundi-workflows/.github/workflows/update_hcl.yml@v2
if: startsWith(github.ref, 'refs/heads/release')
needs: [vars, build, deploy_stage]
with:
git_repository: PADAS/gundi-integrations-v2-infra
file_location: ${{ needs.vars.outputs.tf_file_prod }}
key_name: image
new_value: "${{ needs.vars.outputs.repository }}:${{ needs.vars.outputs.tag }}"
environment: prod
secrets:
ssh-key: ${{ secrets.GUNDI_INTEGRATIONS_DEPLOY_KEY }}
ssh-key: ${{ secrets.GUNDI_INTEGRATIONS_DEPLOY_KEY }}

0 comments on commit 2829258

Please sign in to comment.