Skip to content

Commit

Permalink
tinker
Browse files Browse the repository at this point in the history
  • Loading branch information
LesnyRumcajs committed Jan 18, 2024
1 parent d963124 commit 793b611
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy-daily-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ on:

jobs:
deploy-daily-snapshot:
env:
TF_VAR_monitoring: "{ \"enable\": true,\"slack_enable\":true,\"slack_destination_id\":\"${{ secrets.SLACK_DESTINATION_ID }}\",\"slack_channel_id\":\"${{ secrets.SLACK_CHANNEL_ID }}\"}"
runs-on: ubuntu-latest
permissions: write-all
steps:
Expand All @@ -39,7 +41,8 @@ jobs:
r2_access_key: ${{ secrets.R2_ACCESS_KEY }}
r2_secret_key: ${{ secrets.R2_SECRET_KEY }}
slack_token: ${{ secrets.SLACK_TOKEN }}
working_directory: tf-managed/live/environments/prod/applications/snapshot-service
working_directory: tf-managed/live/environments/dev/applications/snapshot-service
service_name: Snapshot Service
new_relic_account_id: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
new_relic_api_key: ${{ secrets.NEW_RELIC_API_KEY }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
3 changes: 2 additions & 1 deletion .github/workflows/deploy-sync-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:
r2_access_key: ${{ secrets.R2_ACCESS_KEY }}
r2_secret_key: ${{ secrets.R2_SECRET_KEY }}
slack_token: ${{ secrets.SLACK_TOKEN }}
working_directory: tf-managed/live/environments/prod/applications/sync-check
working_directory: tf-managed/live/environments/dev/applications/sync-check
service_name: Sync Check Service
new_relic_account_id: ${{ secrets.NEW_RELIC_ACCOUNT_ID }}
new_relic_api_key: ${{ secrets.NEW_RELIC_API_KEY }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
10 changes: 9 additions & 1 deletion composite-action/terragrunt/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ inputs:
working_directory:
description: 'The working Directory'
required: true
ssh_private_key:
description: 'The SSH private key to use for connecting to Droplets via SSH'
slack_token:
description: 'The slack token secret used to connect the Infrastructure to Slack'
new_relic_api_key:
Expand Down Expand Up @@ -138,8 +140,14 @@ runs:
shell: bash
run: exit 1

- name: Configure ssh-agent
# if: github.ref == 'refs/heads/main' && ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' )
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ inputs.ssh_private_key }}

- name: Terragrunt Apply
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
# if: github.ref == 'refs/heads/main' && github.event_name == 'push'
shell: bash
run: |
if grep -q 'No changes.' ${{ github.workspace }}/tfplan; then
Expand Down

0 comments on commit 793b611

Please sign in to comment.