Skip to content

Commit

Permalink
first try at regions stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
robgutsopedra committed Mar 14, 2024
1 parent 8f6d5dc commit ac6a08b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/cron_deploy-from-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ on:
region:
required: false
type: string
description: "Region name to deploy - europe or us, defaults to europe"
description: "Region name to deploy - europe or us-central1, defaults to europe"
default: "europe"


Expand Down Expand Up @@ -99,10 +99,10 @@ jobs:
exit 1
- name: Region Validation
if: ${{ env.REGION != 'europe' && env.REGION != 'us' }}
if: ${{ env.REGION != 'europe' && env.REGION != 'us-central1' }}
run: |
echo "Region must be either 'europe' or 'us'."
echo "Region must be either 'europe' or 'us'." >> $GITHUB_STEP_SUMMARY
echo "Region must be either 'europe' or 'us-central1'."
echo "Region must be either 'europe' or 'us-central1'." >> $GITHUB_STEP_SUMMARY
exit 1
- name: Checkout to selected branch
Expand Down Expand Up @@ -154,17 +154,17 @@ jobs:
echo "gar_image_name=$GAR_IMAGE_NAME" >> $GITHUB_OUTPUT
echo "image_name=$IMAGE_NAME" >> $GITHUB_OUTPUT
- name: Get .env file and scheduler depending on region
- name: Get .env file and scheduler for europe region
if: ${{ env.REGION == 'europe' }}
run: |-
cat "deployment_envs/dev.env" > $HOME/dev-copy.env
cat "deployment_schedules/dev" > $HOME/dev-scheduler-copy
- name: Get .env file and scheduler depending on region
if: ${{ env.REGION == 'us' }}
- name: Get .env file and scheduler for us region
if: ${{ env.REGION != 'europe' }}
run: |-
cat "deployment_envs/region/us/dev.env" > $HOME/dev-copy.env
cat "deployment_schedules/region/us/dev" > $HOME/dev-scheduler-copy
cat "deployment_envs/region/${{ env.REGION }}/dev.env" > $HOME/dev-copy.env
cat "deployment_schedules/region/${{ env.REGION }}/dev" > $HOME/dev-scheduler-copy
- id: get_image_tag
name: Get image tag from branch name and commitId
Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:
IMAGE_NAME: ${{ steps.image_name.outputs.image_name }}

- name: Update the Image tags for Dev Environment
if: ${{ env.REGION == 'us' }}
if: ${{ env.REGION != 'europe' }}
run: |-
cd $APP_SQUAD/${{ github.event.repository.name }}/region/${REGION}/${K8S_ENV_NAME}
cat $HOME/dev-copy.env > dev.env
Expand Down

0 comments on commit ac6a08b

Please sign in to comment.