Skip to content

Commit

Permalink
Merge branch 'main' into MLPAB-1346
Browse files Browse the repository at this point in the history
  • Loading branch information
acsauk authored Oct 3, 2023
2 parents 1691c5a + 4fd0af5 commit a0c19a6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tags_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ jobs:
workspace=${workspace//\/}
workspace=${workspace:0:11}
workspace=$(echo ${workspace} | tr '[:upper:]' '[:lower:]')
if ${{ contains(fromJSON('["MLPAB-1419-use-a-single-persistent-environment-for-weblate-changes-optimise-workflow", "weblate-pr"]'), github.head_ref) }}; then
workspace="weblate"
fi
echo "name=${workspace}" >> $GITHUB_OUTPUT
echo ${workspace}
outputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/terraform_environment_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ jobs:
}
- name: Protect environment workspace
if: github.workflow == '[Workflow] PR'
if: github.event_name == 'pull_request' && inputs.workspace_name != 'weblate'
env:
TF_WORKSPACE: ${{ inputs.workspace_name }}
TF_VAR_container_version: ${{ inputs.version_tag }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/workflow_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
with:
run_against_image: true
tag: ${{ needs.create_tags.outputs.version_tag }}
smoke: ${{ contains(fromJSON('["MLPAB-1419-use-a-single-persistent-environment-for-weblate-changes-optimise-workflow", "weblate-pr"]'), github.head_ref) }}
secrets:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_ACTIONS }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_ACTIONS }}
Expand Down
2 changes: 1 addition & 1 deletion scripts/workspace_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fi
export TF_EXIT_CODE="0"

in_use_workspaces=( "$@" )
reserved_workspaces=( "default" "production" "preproduction" "ur" "demo")
reserved_workspaces=( "default" "production" "preproduction" "ur" "demo" "weblate" )

protected_workspaces=( "${in_use_workspaces[@]} ${reserved_workspaces[@]}" )
all_workspaces=$(terraform workspace list|sed 's/*//g')
Expand Down

0 comments on commit a0c19a6

Please sign in to comment.