dockerize snapshot upload #400
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Snapshot Service | |
concurrency: ci-${{ github.ref }}-snapshot-service | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'tf-managed/modules/daily-snapshot/**' | |
- 'tf-managed/scripts/**' | |
- 'tf-managed/live/environments/prod/applications/snapshot-service/**' | |
# This needs to be declared explicitly so that the job is actually | |
# run when moved out of draft. | |
types: [opened, synchronize, reopened, ready_for_review] | |
push: | |
branches: | |
- main | |
paths: | |
- 'tf-managed/modules/daily-snapshot/**' | |
- 'tf-managed/scripts/**' | |
- 'tf-managed/live/environments/prod/applications/snapshot-service' | |
workflow_dispatch: | |
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: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
# Using Custom Composite action in ./composite-action/terragrunt folder | |
- name: Composite Action for Deploying Terragrunt Resources | |
uses: ./composite-action/terragrunt | |
with: | |
do_token: ${{ secrets.DO_TOKEN }} | |
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
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 | |
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 }} |