Skip to content

Commit

Permalink
chore: remove unused workflow steps (#414)
Browse files Browse the repository at this point in the history
* chore: remove unused workflow steps

* fix: use current label to retrieve latest
  • Loading branch information
mohdnr authored Mar 15, 2022
1 parent 49bb48d commit 3300d64
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/merge_to_main_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,6 @@ jobs:
chmod +x bin/terragrunt
echo "bin" >> $GITHUB_PATH
- name: Get changed files
id: changed-files
uses: jitterbit/get-changed-files@v1
with:
format: 'json'

- name: Get touched Terragrunt configurations
run: |
CONFIGS=`echo '${{ steps.changed-files.outputs.added_modified }}' | jq -c '[.[] | match("(.*env?)\/(.*production?)\/(.*)\/").captures[2].string] | unique | select(length > 0)'`
echo "CONFIGS=$CONFIGS" >> $GITHUB_ENV
- name: Inject token authentication
run: |
git config --global url."https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
Expand Down
17 changes: 1 addition & 16 deletions .github/workflows/merge_to_main_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,6 @@ jobs:
chmod +x bin/terragrunt
echo "bin" >> $GITHUB_PATH
- name: Get changed files
id: changed-files
uses: jitterbit/get-changed-files@v1
with:
format: 'json'

- name: Get touched Terragrunt modules
run: |
MODULES=`echo '${{ steps.changed-files.outputs.added_modified }}' | jq -c '[.[] | match("(.*aws?)\/(.*)\/").captures[1].string] | unique | select(length > 0)'`
echo "MODULES=$MODULES" >> $GITHUB_ENV
- name: Get touched Terragrunt configurations
run: |
CONFIGS=`echo '${{ steps.changed-files.outputs.added_modified }}' | jq -c '[.[] | match("(.*env?)\/(.*staging?)\/(.*)\/").captures[2].string] | unique | select(length > 0)'`
echo "CONFIGS=$CONFIGS" >> $GITHUB_ENV
- name: Apply aws/common
run: |
cd env/staging/common
Expand Down Expand Up @@ -144,6 +128,7 @@ jobs:
../../../bin/terragrunt apply --terragrunt-non-interactive -auto-approve
- name: Bump version and push tag
if: github.event_name != 'workflow_dispatch' # We don't want to tag new versions when launched via workflow_dispatch since only environment variables changed
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion aws/common/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ output "s3_bucket_csv_upload_bucket_name" {

output "environment_variables_current_secret_string" {
description = "Environment variables shared between EKS and Lambda"
value = data.aws_secretsmanager_secret_version.environment_variables_current.secret_string
value = data.aws_secretsmanager_secret_version.current.secret_string
sensitive = true
}
2 changes: 1 addition & 1 deletion aws/common/secretsmanager.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ resource "aws_secretsmanager_secret" "environment_variables" {
}
}

data "aws_secretsmanager_secret_version" "environment_variables_current" {
data "aws_secretsmanager_secret_version" "current" {
secret_id = aws_secretsmanager_secret.environment_variables.id
}

0 comments on commit 3300d64

Please sign in to comment.