From 26bf647fb4b3b78302e1811bd932b426c48aeb93 Mon Sep 17 00:00:00 2001 From: Suzanne Vogt Date: Wed, 13 Dec 2023 00:39:07 -0500 Subject: [PATCH] Workflows --- .github/workflows/_update_terraform.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_update_terraform.yml b/.github/workflows/_update_terraform.yml index 7e02500..c92c75e 100644 --- a/.github/workflows/_update_terraform.yml +++ b/.github/workflows/_update_terraform.yml @@ -33,12 +33,10 @@ jobs: repository: 'datacite/mastino' persist-credentials: false - - name: Setup dokerize and template parameters + - name: Setup dockerize and template parameters # use go template in terraform config repository to update git sha and tag # commit and push changes to trigger terraform workflow run: | - export GIT_SHA=${{ steps.extract_variables.outputs.GIT_SHA_SHORT }} - export GIT_TAG=${{ steps.extract_variables.outputs.GIT_TAG }} git config --local user.email "action@github.com" git config --local user.name "GitHub Action" wget https://github.com/jwilder/dockerize/releases/download/v0.6.0/dockerize-linux-amd64-v0.6.0.tar.gz @@ -48,6 +46,8 @@ jobs: - name: Conditionally update staging environment if: ${{ (inputs.deployment_environment == 'staging') }} run: | + export GIT_SHA=${{ steps.extract_variables.outputs.GIT_SHA_SHORT }} + export GIT_TAG=${{ steps.extract_variables.outputs.GIT_TAG }} ./dockerize -template stage/services/mds/_poodle.auto.tfvars.tmpl:stage/services/mds/_poodle.auto.tfvars git add stage/services/mds/_poodle.auto.tfvars git commit -m "Adding poodle git variables for commit ${{ steps.extract_variables.outputs.GIT_SHA }}" @@ -55,6 +55,8 @@ jobs: #- name: Conditionally update production/test environments # if: ${{ (inputs.deployment_environment == 'production') }} # run: | + # export GIT_SHA=${{ steps.extract_variables.outputs.GIT_SHA_SHORT }} + # export GIT_TAG=${{ steps.extract_variables.outputs.GIT_TAG }} # ./dockerize -template prod-eu-west/services/mds/_poodle.auto.tfvars.tmpl:prod-eu-west/services/mds/_poodle.auto.tfvars # ./dockerize -template test/services/mds/_poodle.auto.tfvars.tmpl:test/services/mds/_poodle.auto.tfvars # git add prod-eu-west/services/mds/_poodle.auto.tfvars