Skip to content

Commit

Permalink
actions
Browse files Browse the repository at this point in the history
  • Loading branch information
james-otten committed Sep 6, 2024
1 parent 80b34dd commit 4890b8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ permissions: read-all
on:
push:
branches:
- main
- master
- james/iac
workflow_dispatch:
branches:
- main
- master

jobs:
deploy_dev3:
Expand All @@ -17,12 +17,12 @@ jobs:
with:
environment: dev3
secrets: inherit
#if: github.ref == 'refs/heads/main'
#if: github.ref == 'refs/heads/master'

deploy_prod1:
name: Deploy prod1
uses: ./.github/workflows/deploy_environment.yaml
with:
environment: prod1
secrets: inherit
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/master'
8 changes: 4 additions & 4 deletions .github/workflows/deploy_environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ jobs:

- name: Terraform Apply
run: |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > terraform/vpn
echo "${{ secrets.SSH_PUBLIC_KEY }}" > terraform/vpn.pub
chmod 600 terraform/vpn
chmod 600 terraform/vpn.pub
echo "${{ secrets.SSH_PRIVATE_KEY }}" > vpn
echo "${{ secrets.SSH_PUBLIC_KEY }}" > vpn.pub
chmod 600 vpn
chmod 600 vpn.pub
terraform apply -auto-approve -input=false -var-file=${{ inputs.environment }}.tfvars
working-directory: ./terraform/

Expand Down

0 comments on commit 4890b8c

Please sign in to comment.