Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zkokelj committed Aug 23, 2024
1 parent f5ae322 commit de281ae
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/manual-deploy-obscuro-gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ jobs:
- name: 'Set up environment variables'
id: setup_env
run: |
echo "test"
INSTANCE_SUFFIX=""
INSTANCE_PREFIX=""
INSTANCE_SUFFIX="${{ github.event.inputs.instance_type == 'primary' && '' || format('-{}', github.event.inputs.instance_type) }}"
INSTANCE_PREFIX=$(echo "${{ github.event.inputs.instance_type == 'primary' && '' || format('{}-', github.event.inputs.instance_type) }}")
if [[ "${{ github.event.inputs.instance_type }}" != "primary" ]]; then
INSTANCE_SUFFIX="-${{ github.event.inputs.instance_type }}"
INSTANCE_PREFIX="${{ github.event.inputs.instance_type }}-"
fi
echo "INSTANCE_SUFFIX=$INSTANCE_SUFFIX" >> $GITHUB_ENV
echo "INSTANCE_PREFIX=$INSTANCE_PREFIX" >> $GITHUB_ENV
Expand All @@ -55,7 +58,7 @@ jobs:
PUBLIC_IP="${{ github.event.inputs.testnet_type }}-OG-static${INSTANCE_SUFFIX}"
DNS_NAME="obscurogateway-${{ github.event.inputs.testnet_type }}${INSTANCE_SUFFIX}"
VM_NAME="${{ github.event.inputs.testnet_type }}-OG-${{ github.run_number }}${INSTANCE_SUFFIX}"
DEPLOY_GROUP="ObscuroGateway-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }}${INSTANCE_SUFFIX}"
DEPLOY_GROUP="ObscuroGateway-${{ github.event.inputs.testnet_type }}-${{ github.run_number }}${INSTANCE_SUFFIX}"
VNET_NAME="ObscuroGateway-${{ github.event.inputs.testnet_type }}-01VNET${INSTANCE_SUFFIX}"
SUBNET_NAME="ObscuroGateway-${{ github.event.inputs.testnet_type }}-01Subnet${INSTANCE_SUFFIX}"
Expand All @@ -67,12 +70,12 @@ jobs:
echo "SUBNET_NAME=$SUBNET_NAME" >> $GITHUB_ENV
# Set instance-specific variables
DOCKER_BUILD_TAG_GATEWAY="${{ vars[format('{}DOCKER_BUILD_TAG_GATEWAY', env.INSTANCE_PREFIX)] }}"
AZURE_DEPLOY_GROUP_GATEWAY="${{ vars[format('{}AZURE_DEPLOY_GROUP_GATEWAY', env.INSTANCE_PREFIX)] }}"
L2_RPC_URL_VALIDATOR="${{ vars[format('{}L2_RPC_URL_VALIDATOR', env.INSTANCE_PREFIX)] }}"
GATEWAY_RATE_LIMIT_USER_COMPUTE_TIME="${{ vars[format('{}GATEWAY_RATE_LIMIT_USER_COMPUTE_TIME', env.INSTANCE_PREFIX)] }}"
GATEWAY_RATE_LIMIT_WINDOW="${{ vars[format('{}GATEWAY_RATE_LIMIT_WINDOW', env.INSTANCE_PREFIX)] }}"
GATEWAY_MAX_CONCURRENT_REQUESTS_PER_USER="${{ vars[format('{}GATEWAY_MAX_CONCURRENT_REQUESTS_PER_USER', env.INSTANCE_PREFIX)] }}"
DOCKER_BUILD_TAG_GATEWAY="${{ vars[env.INSTANCE_PREFIX + 'DOCKER_BUILD_TAG_GATEWAY'] }}"
AZURE_DEPLOY_GROUP_GATEWAY="${{ vars[env.INSTANCE_PREFIX + 'AZURE_DEPLOY_GROUP_GATEWAY'] }}"
L2_RPC_URL_VALIDATOR="${{ vars[env.INSTANCE_PREFIX + 'L2_RPC_URL_VALIDATOR'] }}"
GATEWAY_RATE_LIMIT_USER_COMPUTE_TIME="${{ vars[env.INSTANCE_PREFIX + 'GATEWAY_RATE_LIMIT_USER_COMPUTE_TIME'] }}"
GATEWAY_RATE_LIMIT_WINDOW="${{ vars[env.INSTANCE_PREFIX + 'GATEWAY_RATE_LIMIT_WINDOW'] }}"
GATEWAY_MAX_CONCURRENT_REQUESTS_PER_USER="${{ vars[env.INSTANCE_PREFIX + 'GATEWAY_MAX_CONCURRENT_REQUESTS_PER_USER'] }}"
echo "DOCKER_BUILD_TAG_GATEWAY=$DOCKER_BUILD_TAG_GATEWAY" >> $GITHUB_ENV
echo "AZURE_DEPLOY_GROUP_GATEWAY=$AZURE_DEPLOY_GROUP_GATEWAY" >> $GITHUB_ENV
Expand Down

0 comments on commit de281ae

Please sign in to comment.