Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added missing env vars in Gateway build and release action #2266

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions .github/workflows/build-release-gw-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,29 @@ jobs:
IMAGE_NAME_GATEWAY_FE="obscuro_gateway_${SANITIZED_TESTNET_TYPE}_fe"
echo "IMAGE_NAME_GATEWAY_FE=$IMAGE_NAME_GATEWAY_FE" >> $GITHUB_ENV

# Set instance-specific variables
declare -a VAR_NAMES=(
"GATEWAY_URL"
"NETWORK_NAME"
"TENSCAN_URL"
)

for VAR_NAME in "${VAR_NAMES[@]}"; do
FULL_VAR_NAME="${INSTANCE_PREFIX}${VAR_NAME}"
VAR_VALUE=$(jq -r --arg key "$FULL_VAR_NAME" '.[$key] // empty' <<< '${{ toJson(vars) }}')
if [[ -n "$VAR_VALUE" ]]; then
echo "${VAR_NAME}=${VAR_VALUE}" >> $GITHUB_ENV
else
echo "Warning: ${FULL_VAR_NAME} not found in vars" >&2
fi
done

- name: "Print GitHub variables"
run: |
echo "Selected Testnet Type: ${{ github.event.inputs.testnet_type }}"
echo "Selected Instance Type: ${{ github.event.inputs.instance_type }}"
echo "DNS_NAME_LABEL_GATEWAY_FE: $DNS_NAME_LABEL_GATEWAY_FE"
echo "IMAGE_NAME_GATEWAY_FE: $IMAGE_NAME_GATEWAY_FE"
echo "DOCKER_BUILD_TAG_GATEWAY_FE: $DOCKER_BUILD_TAG_GATEWAY_FE"
echo "GATEWAY_URL: $GATEWAY_URL"
echo "NETWORK_NAME: $NETWORK_NAME"
echo "TENSCAN_URL: $TENSCAN_URL"
Expand Down Expand Up @@ -108,9 +124,11 @@ jobs:
echo "VERSION=${VERSION}"

DOCKER_BUILDKIT=1 docker build \
--build-arg NEXT_PUBLIC_NETWORK_NAME=${{ env.NETWORK_NAME }} \
--build-arg NEXT_PUBLIC_NETWORK_NAME="${{ env.NETWORK_NAME }}" \
--build-arg NEXT_PUBLIC_TENSCAN_URL=${{ env.TENSCAN_URL }} \
--build-arg NEXT_PUBLIC_GATEWAY_URL=${{ env.GATEWAY_URL }} \
-t testnetobscuronet.azurecr.io/obscuronet/${{ env.IMAGE_NAME_GATEWAY_FE }}:${VERSION} \
-f ./tools/walletextension/frontend/Dockerfile .
docker push testnetobscuronet.azurecr.io/obscuronet/${{ env.IMAGE_NAME_GATEWAY_FE }}:${VERSION}

docker push testnetobscuronet.azurecr.io/obscuronet/${{ env.IMAGE_NAME_GATEWAY_FE }}:${VERSION}

Loading