diff --git a/.github/workflows/manual-deploy-dev-obscuroscan.yml b/.github/workflows/manual-deploy-dev-obscuroscan.yml deleted file mode 100644 index 0f53d1c6aa..0000000000 --- a/.github/workflows/manual-deploy-dev-obscuroscan.yml +++ /dev/null @@ -1,57 +0,0 @@ -# Deploys Obscuroscan on Azure for Dev-testnet -# Builds the Obscuroscan network image, pushes the image to dockerhub and starts the Obscuroscan on azure -# -# Obscuroscan is a docker container that runs the obscuroscan package -# It exposes the following ports: -# HTTP: 80, -# -# Exposes the following addresses: (only accessible internally) -# dev-testnet-obscuroscan.uksouth.azurecontainer.io - -name: '[M] Deploy Dev-Testnet Obscuroscan' - -on: - workflow_dispatch: - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Docker - uses: docker/setup-buildx-action@v1 - - - name: 'Login via Azure CLI' - uses: azure/login@v1 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: 'Build and push image' - uses: azure/docker-login@v1 - with: - login-server: testnetobscuronet.azurecr.io - username: testnetobscuronet - password: ${{ secrets.REGISTRY_PASSWORD }} - - run: | - DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuronet/dev_testnet_obscuroscan:latest -f tools/obscuroscan/Dockerfile . - docker push testnetobscuronet.azurecr.io/obscuronet/dev_testnet_obscuroscan:latest - - - name: 'Deploy to Azure Container Instances' - uses: 'azure/aci-deploy@v1' - with: - resource-group: ${{ secrets.RESOURCE_GROUP }} - dns-name-label: dev-testnet-obscuroscan - image: testnetobscuronet.azurecr.io/obscuronet/dev_testnet_obscuroscan:latest - registry-login-server: testnetobscuronet.azurecr.io - registry-username: testnetobscuronet - registry-password: ${{ secrets.REGISTRY_PASSWORD }} - name: dev-testnet-obscuroscan - location: 'uksouth' - restart-policy: 'Never' - command-line: ./tools/obscuroscan/main/main --rpcServerAddress http://erpc.dev-testnet.obscu.ro:80 --address 0.0.0.0:80 - ports: '80' - cpu: 2 - memory: 2 - - diff --git a/.github/workflows/manual-deploy-obscuro-gateway-database.yml b/.github/workflows/manual-deploy-obscuro-gateway-database.yml index f8dff0b827..7886df2593 100644 --- a/.github/workflows/manual-deploy-obscuro-gateway-database.yml +++ b/.github/workflows/manual-deploy-obscuro-gateway-database.yml @@ -19,7 +19,14 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + environment: + name: ${{ github.event.inputs.testnet_type }} steps: + - name: 'Print GitHub variables' + # This is a useful record of what the environment variables were at the time the job ran, for debugging and reference + run: | + echo "GitHub Variables = ${{ toJSON(vars) }}" + - uses: actions/checkout@v3 - name: 'Extract branch name' @@ -28,28 +35,6 @@ jobs: echo "Branch Name: ${GITHUB_REF_NAME}" echo "BRANCH_NAME=${GITHUB_REF_NAME}" >> $GITHUB_ENV - - name: 'Set Obscuro Gateway variables for UAT testnet' - if: ${{ github.event.inputs.testnet_type == 'uat-testnet' }} - run: | - echo "OBSCURO_GATEWAY_DB_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_mariadb_uat_testnet:latest" >> $GITHUB_ENV - echo "RESOURCE_STARTING_NAME=uat-testnet" >> $GITHUB_ENV - echo "RESOURCE_TAG_NAME=obscuro-gateway-db-testnet-latest" >> $GITHUB_ENV - - - name: 'Set Obscuro Gateway variables for dev-testnet' - if: ${{ github.event.inputs.testnet_type == 'dev-testnet' }} - run: | - echo "OBSCURO_GATEWAY_DB_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_mariadb_dev_testnet:latest" >> $GITHUB_ENV - echo "RESOURCE_STARTING_NAME=dev-testnet" >> $GITHUB_ENV - echo "RESOURCE_TAG_NAME=obscuro-gateway-db-dev-testnet-latest" >> $GITHUB_ENV - - - name: 'Set Obscuro Gateway variables for sepolia-testnet' - if: ${{ github.event.inputs.testnet_type == 'sepolia-testnet' }} - run: | - echo "OBSCURO_GATEWAY_DB_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_mariadb_sepolia_testnet:latest" >> $GITHUB_ENV - echo "RESOURCE_STARTING_NAME=sepolia-testnet" >> $GITHUB_ENV - echo "RESOURCE_TAG_NAME=obscuro-gateway-db-sepolia-testnet-latest" >> $GITHUB_ENV - - - name: 'Login via Azure CLI' uses: azure/login@v1 with: @@ -60,7 +45,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - $(az resource list --tag ${{env.RESOURCE_TAG_NAME}}=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true + $(az resource list --tag ${{ vars.AZURE_DEPLOY_GROUP_GATEWAY_DB }}=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true # This will clean up any lingering dependencies - might fail if there are no resources to cleanup - name: 'Delete VMs dependencies' @@ -74,10 +59,10 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az vm create -g Testnet -n "${{env.RESOURCE_STARTING_NAME}}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }}" \ + az vm create -g Testnet -n "${{ github.event.inputs.testnet_type }}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }}" \ --admin-username obscurouser --admin-password "${{ secrets.OBSCURO_NODE_VM_PWD }}" \ - --public-ip-address-dns-name "obscurogateway-mariadb-${{env.RESOURCE_STARTING_NAME}}" \ - --tags deploygroup=ObscuroGateway-mariaDB-${{env.RESOURCE_STARTING_NAME}}-${{ GITHUB.RUN_NUMBER }} ${{env.RESOURCE_TAG_NAME}}=true \ + --public-ip-address-dns-name "obscurogateway-mariadb-${{ github.event.inputs.testnet_type }}" \ + --tags deploygroup=ObscuroGateway-mariaDB-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} ${{ vars.AZURE_DEPLOY_GROUP_GATEWAY_DB }}=true \ --size Standard_D4_v5 --image Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latest \ --public-ip-sku Basic --authentication-type password @@ -85,7 +70,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az vm open-port -g Testnet -n "${{env.RESOURCE_STARTING_NAME}}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }}" --port 3306 + az vm open-port -g Testnet -n "${{ github.event.inputs.testnet_type }}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }}" --port 3306 # To overcome issues with critical VM resources being unavailable, we need to wait for the VM to be ready - name: 'Allow time for VM initialization' @@ -96,7 +81,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az vm run-command invoke -g Testnet -n "${{env.RESOURCE_STARTING_NAME}}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }}" \ + az vm run-command invoke -g Testnet -n "${{ github.event.inputs.testnet_type }}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }}" \ --command-id RunShellScript \ --scripts 'mkdir -p /home/obscuro \ && sudo apt-get update \ @@ -119,7 +104,7 @@ jobs: -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ datadog/agent:latest \ && cd /home/obscuro/go-obscuro/ \ - && docker run -d --name ${{env.RESOURCE_STARTING_NAME}}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }} \ + && docker run -d --name ${{ github.event.inputs.testnet_type }}-OG-MariaDB-${{ GITHUB.RUN_NUMBER }} \ -p 3306:3306 \ -e MARIADB_ROOT_PASSWORD=${{ secrets.OBSCURO_GATEWAY_MARIADB_ROOT_PWD }} \ -e MARIADB_USER=obscurouser \ diff --git a/.github/workflows/manual-deploy-obscuro-gateway.yml b/.github/workflows/manual-deploy-obscuro-gateway.yml index 696d36c8bd..5e95506e53 100644 --- a/.github/workflows/manual-deploy-obscuro-gateway.yml +++ b/.github/workflows/manual-deploy-obscuro-gateway.yml @@ -19,7 +19,14 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + environment: + name: ${{ github.event.inputs.testnet_type }} steps: + - name: 'Print GitHub variables' + # This is a useful record of what the environment variables were at the time the job ran, for debugging and reference + run: | + echo "GitHub Variables = ${{ toJSON(vars) }}" + - uses: actions/checkout@v3 - name: 'Extract branch name' @@ -31,30 +38,6 @@ jobs: - name: 'Set up Docker' uses: docker/setup-buildx-action@v1 - - name: 'Set Obscuro Gateway variables for testnet' - if: ${{ github.event.inputs.testnet_type == 'uat-testnet' }} - run: | - echo "OBSCURO_GATEWAY_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_uat_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_GATEWAY_NODE_HOST=erpc.uat-testnet.obscu.ro" >> $GITHUB_ENV - echo "RESOURCE_STARTING_NAME=uat-testnet" >> $GITHUB_ENV - echo "RESOURCE_TAG_NAME=obscuro-gateway-uat-testnet-latest" >> $GITHUB_ENV - - - name: 'Set Obscuro Gateway variables for dev-testnet' - if: ${{ github.event.inputs.testnet_type == 'dev-testnet' }} - run: | - echo "OBSCURO_GATEWAY_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_dev_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_GATEWAY_NODE_HOST=erpc.dev-testnet.obscu.ro" >> $GITHUB_ENV - echo "RESOURCE_STARTING_NAME=dev-testnet" >> $GITHUB_ENV - echo "RESOURCE_TAG_NAME=obscuro-gateway-dev-testnet-latest" >> $GITHUB_ENV - - - name: 'Set Obscuro Gateway variables for sepolia-testnet' - if: ${{ github.event.inputs.testnet_type == 'sepolia-testnet' }} - run: | - echo "OBSCURO_GATEWAY_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/obscuro_gateway_sepolia_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_GATEWAY_NODE_HOST=erpc.sepolia-testnet.obscu.ro" >> $GITHUB_ENV - echo "RESOURCE_STARTING_NAME=sepolia-testnet" >> $GITHUB_ENV - echo "RESOURCE_TAG_NAME=obscuro-gateway-sepolia-testnet-latest" >> $GITHUB_ENV - - name: 'Login to Azure docker registry' uses: azure/docker-login@v1 with: @@ -69,33 +52,33 @@ jobs: - name: Build and Push Docker Image run: | - DOCKER_BUILDKIT=1 docker build -t ${{ env.OBSCURO_GATEWAY_BUILD_TAG }} -f ./tools/walletextension/Dockerfile . - docker push ${{ env.OBSCURO_GATEWAY_BUILD_TAG }} + DOCKER_BUILDKIT=1 docker build -t ${{ vars.DOCKER_BUILD_TAG_GATEWAY }} -f ./tools/walletextension/Dockerfile . + docker push ${{ vars.DOCKER_BUILD_TAG_GATEWAY }} # This will fail some deletions due to resource dependencies ( ie. you must first delete the vm before deleting the disk) - name: 'Delete deployed VMs' uses: azure/CLI@v1 with: inlineScript: | - $(az resource list --tag ${{env.RESOURCE_TAG_NAME}}=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true + $(az resource list --tag ${{ vars.AZURE_DEPLOY_GROUP_GATEWAY }}=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true # This will clean up any lingering dependencies - might fail if there are no resources to cleanup - name: 'Delete VMs dependencies' uses: azure/CLI@v1 with: inlineScript: | - $(az resource list --tag ${{env.RESOURCE_TAG_NAME}}=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true + $(az resource list --tag ${{ vars.AZURE_DEPLOY_GROUP_GATEWAY }}=true --query '[]."id"' -o tsv | xargs -n1 az resource delete --verbose -g Testnet --ids) || true - name: 'Create VM for Gateway node on Azure' uses: azure/CLI@v1 with: inlineScript: | - az vm create -g Testnet -n "${{env.RESOURCE_STARTING_NAME}}-OG-${{ GITHUB.RUN_NUMBER }}" \ + az vm create -g Testnet -n "${{ github.event.inputs.testnet_type }}-OG-${{ GITHUB.RUN_NUMBER }}" \ --admin-username obscurouser --admin-password "${{ secrets.OBSCURO_NODE_VM_PWD }}" \ - --public-ip-address-dns-name "obscurogateway-${{env.RESOURCE_STARTING_NAME}}" \ - --tags deploygroup=ObscuroGateway-${{env.RESOURCE_STARTING_NAME}}-${{ GITHUB.RUN_NUMBER }} ${{env.RESOURCE_TAG_NAME}}=true \ - --vnet-name ObscuroGateway-${{env.RESOURCE_STARTING_NAME}}-01VNET --subnet ObscuroGateway-${{env.RESOURCE_STARTING_NAME}}-01Subnet \ + --public-ip-address-dns-name "obscurogateway-${{ github.event.inputs.testnet_type }}" \ + --tags deploygroup=ObscuroGateway-${{ github.event.inputs.testnet_type }}-${{ GITHUB.RUN_NUMBER }} ${{ vars.AZURE_DEPLOY_GROUP_GATEWAY }}=true \ + --vnet-name ObscuroGateway-${{ github.event.inputs.testnet_type }}-01VNET --subnet ObscuroGateway-${{ github.event.inputs.testnet_type }}-01Subnet \ --size Standard_D4_v5 --image Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latest \ --public-ip-sku Basic --authentication-type password @@ -103,7 +86,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az vm open-port -g Testnet -n "${{env.RESOURCE_STARTING_NAME}}-OG-${{ GITHUB.RUN_NUMBER }}" --port 80,81 + az vm open-port -g Testnet -n "${{ github.event.inputs.testnet_type }}-OG-${{ GITHUB.RUN_NUMBER }}" --port 80,81 # To overcome issues with critical VM resources being unavailable, we need to wait for the VM to be ready - name: 'Allow time for VM initialization' @@ -114,7 +97,7 @@ jobs: uses: azure/CLI@v1 with: inlineScript: | - az vm run-command invoke -g Testnet -n "${{env.RESOURCE_STARTING_NAME}}-OG-${{ GITHUB.RUN_NUMBER }}" \ + az vm run-command invoke -g Testnet -n "${{ github.event.inputs.testnet_type }}-OG-${{ GITHUB.RUN_NUMBER }}" \ --command-id RunShellScript \ --scripts 'mkdir -p /home/obscuro \ && sudo apt-get update \ @@ -137,8 +120,8 @@ jobs: -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \ datadog/agent:latest \ && cd /home/obscuro/go-obscuro/ \ - && docker run -d -p 80:80 -p 81:81 --name ${{env.RESOURCE_STARTING_NAME}}-OG-${{ GITHUB.RUN_NUMBER }} \ + && docker run -d -p 80:80 -p 81:81 --name ${{ github.event.inputs.testnet_type }}-OG-${{ GITHUB.RUN_NUMBER }} \ -e OBSCURO_GATEWAY_VERSION="${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }}" \ - ${{ env.OBSCURO_GATEWAY_BUILD_TAG }} \ - ./wallet_extension_linux -host=0.0.0.0 -port=80 -portWS=81 -nodeHost=${{ env.OBSCURO_GATEWAY_NODE_HOST }} \ + ${{ vars.DOCKER_BUILD_TAG_GATEWAY }} \ + ./wallet_extension_linux -host=0.0.0.0 -port=80 -portWS=81 -nodeHost=${{ vars.L2_RPC_URL_VALIDATOR }} \ -logPath=sys_out -dbType=mariaDB -dbConnectionURL="obscurouser:${{ secrets.OBSCURO_GATEWAY_MARIADB_USER_PWD }}@tcp(obscurogateway-mariadb-${{ github.event.inputs.testnet_type }}.uksouth.cloudapp.azure.com:3306)/ogdb"' diff --git a/.github/workflows/manual-deploy-obscuro-scan-2.yml b/.github/workflows/manual-deploy-obscuro-scan-2.yml index 88c02dd2cb..5433288240 100644 --- a/.github/workflows/manual-deploy-obscuro-scan-2.yml +++ b/.github/workflows/manual-deploy-obscuro-scan-2.yml @@ -19,33 +19,19 @@ on: jobs: build-and-deploy: runs-on: ubuntu-latest + environment: + name: ${{ github.event.inputs.testnet_type }} steps: + - name: 'Print GitHub variables' + # This is a useful record of what the environment variables were at the time the job ran, for debugging and reference + run: | + echo "GitHub Variables = ${{ toJSON(vars) }}" + - uses: actions/checkout@v3 - name: 'Set up Docker' uses: docker/setup-buildx-action@v1 - - name: 'Set Obscuro Scan variables for sepolia-testnet' - if: ${{ github.event.inputs.testnet_type == 'sepolia-testnet' }} - run: | - echo "OBSCURO_SCAN_FE_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/fe_obscuro_scan_sepolia_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_SCAN_API_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/api_obscuro_scan_sepolia_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_SCAN_NODE_HOST=erpc.sepolia-testnet.obscu.ro" >> $GITHUB_ENV - - - name: 'Set Obscuro Scan variables for uat-testnet' - if: ${{ github.event.inputs.testnet_type == 'uat-testnet' }} - run: | - echo "OBSCURO_SCAN_FE_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/fe_obscuro_scan_uat_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_SCAN_API_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/api_obscuro_scan_uat_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_SCAN_NODE_HOST=erpc.uat-testnet.obscu.ro" >> $GITHUB_ENV - - - name: 'Set Obscuro Scan variables for dev-testnet' - if: ${{ github.event.inputs.testnet_type == 'dev-testnet' }} - run: | - echo "OBSCURO_SCAN_FE_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/fe_obscuro_scan_dev_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_SCAN_API_BUILD_TAG=testnetobscuronet.azurecr.io/obscuronet/api_obscuro_scan_dev_testnet:latest" >> $GITHUB_ENV - echo "OBSCURO_SCAN_NODE_HOST=erpc.dev-testnet.obscu.ro" >> $GITHUB_ENV - - name: 'Login to Azure docker registry' uses: azure/docker-login@v1 with: @@ -60,20 +46,20 @@ jobs: - name: Build and Push Docker FE Image run: | - DOCKER_BUILDKIT=1 docker build -t ${{ env.OBSCURO_SCAN_FE_BUILD_TAG }} -f ./tools/obscuroscan_v2/frontend/Dockerfile . - docker push ${{ env.OBSCURO_SCAN_FE_BUILD_TAG }} + DOCKER_BUILDKIT=1 docker build -t ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }} -f ./tools/obscuroscan_v2/frontend/Dockerfile . + docker push ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }} - name: Build and Push Docker API Image run: | - DOCKER_BUILDKIT=1 docker build -t ${{ env.OBSCURO_SCAN_API_BUILD_TAG }} -f ./tools/obscuroscan_v2/backend/Dockerfile . - docker push ${{ env.OBSCURO_SCAN_API_BUILD_TAG }} + DOCKER_BUILDKIT=1 docker build -t ${{ vars.DOCKER_BUILD_TAG_SCAN_API }} -f ./tools/obscuroscan_v2/backend/Dockerfile . + docker push ${{ vars.DOCKER_BUILD_TAG_SCAN_API }} - name: 'Deploy FE to Azure Container Instances' uses: 'azure/aci-deploy@v1' with: resource-group: ${{ secrets.RESOURCE_GROUP }} dns-name-label: ${{ github.event.inputs.testnet_type }}-obscuro-scan - image: ${{ env.OBSCURO_SCAN_FE_BUILD_TAG }} + image: ${{ vars.DOCKER_BUILD_TAG_SCAN_FE }} name: ${{ github.event.inputs.testnet_type }}-fe-obscuro-scan location: 'uksouth' restart-policy: 'Never' @@ -88,11 +74,11 @@ jobs: with: resource-group: ${{ secrets.RESOURCE_GROUP }} dns-name-label: ${{ github.event.inputs.testnet_type }}-api-obscuro-scan - image: ${{ env.OBSCURO_SCAN_API_BUILD_TAG }} + image: ${{ vars.DOCKER_BUILD_TAG_SCAN_API }} name: ${{ github.event.inputs.testnet_type }}-api-obscuro-scan location: 'uksouth' restart-policy: 'Never' - command-line: ./cmd/backend --nodeHostAddress http://${{ env.OBSCURO_SCAN_NODE_HOST }}:80 --serverAddress 0.0.0.0:80 + command-line: ./cmd/backend --nodeHostAddress http://${{ vars.L2_RPC_URL_VALIDATOR }}:80 --serverAddress 0.0.0.0:80 ports: '80' cpu: 2 memory: 2 diff --git a/.github/workflows/manual-deploy-obscuroscan.yml b/.github/workflows/manual-deploy-obscuroscan.yml deleted file mode 100644 index 87ad76e5f8..0000000000 --- a/.github/workflows/manual-deploy-obscuroscan.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Deploys Obscuroscan on Azure for Testnet -# Builds the Obscuroscan network image, pushes the image to dockerhub and starts Obscuroscan on Azure as a web app. -# This allows Obscuroscan to be served using HTTPS, important because API calls can then be made from different domains. -# Obscuroscan is a docker container that runs the obscuroscan package -# It exposes the following ports: -# HTTPS: 80 -# -# Exposes the following addresses: -# https://testnet-obscuroscan.azurewebsites.net - -name: '[M] Deploy Testnet Obscuroscan' - -on: - workflow_dispatch: - -env: - AZURE_WEBAPP_NAME: testnet-obscuroscan - CONTAINER_REGISTRY: testnetobscuronet.azurecr.io # set secret with Container Registry URL, example : xyz.azurecr.io - AZURE_RESOURCE_GROUP: testnet # set this to your Azure Resource group's name - Needed only if you are provisioning the app in the workflow - AZURE_APP_PLAN: obscuroscan-plan # set this to your App service plan's name - Needed only if you are provisioning the app in the workflow - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Azure authentication - uses: azure/login@v1 - with: - login-server: testnetobscuronet.azurecr.io - creds: ${{ secrets.AZURE_CREDENTIALS }} - - name: ACR authentication - uses: azure/docker-login@v1 - with: - login-server: testnetobscuronet.azurecr.io - username: testnetobscuronet - password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Docker Build & Push to ACR - run: | - DOCKER_BUILDKIT=1 docker build -t testnetobscuronet.azurecr.io/obscuronet/obscuro_uat_testnet_obscuroscan:latest -f tools/obscuroscan/Dockerfile . - docker push testnetobscuronet.azurecr.io/obscuronet/obscuro_uat_testnet_obscuroscan:latest - - - name: 'Deploy to Azure Web App for Container' - uses: azure/webapps-deploy@v2 - with: - app-name: ${{ env.AZURE_WEBAPP_NAME }} - images: testnetobscuronet.azurecr.io/obscuronet/obscuro_testnet_obscuroscan:latest - startup-command: './tools/obscuroscan/main/main --rpcServerAddress http://erpc.testnet.obscu.ro:80 --address 0.0.0.0:80' \ No newline at end of file