Merge pull request #86 from UKHSA-Internal/COVP-171_replace_Spring23_… #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Easy Read to Sandbox Environment | |
on: | |
push: | |
branches: | |
- sandbox | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy Easy Read to Sandbox Environment | |
environment: sandbox | |
## declares credentials for Azure Container Registry | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to Azure Container Registry | |
uses: azure/docker-login@v1 | |
with: | |
login-server: c19dashacrprod.azurecr.io | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- run: | | |
docker build . -t c19dashacrprod.azurecr.io/easyread-server:${{ github.run_id }}-sandbox | |
docker push c19dashacrprod.azurecr.io/easyread-server:${{ github.run_id }}-sandbox | |
## Deploys to the docker image to the Easy Reader App Service ### | |
- name: Deploy Container to Azure App Services | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: 'c19dashsbuksfe01easyread01' | |
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
images: 'c19dashacrprod.azurecr.io/easyread-server:${{ github.run_id }}-sandbox' | |
test: | |
runs-on: ubuntu-latest | |
name: Automated Regression Tests of COVID19 Dashboard Website | |
needs: deploy | |
steps: | |
# ## calls the AIQ-Automation-Covid-Dashboard workflow to run the automated tests | |
- name: Calls AIQ-Automation-Covid-Dashboard workflow to run the automated tests | |
run: | | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.ACCESS_TOKEN }} " \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/UKHSA-Internal/AIQ-Automation-Covid-Dashboard/actions/workflows/CovidDashboard_CI.yml/dispatches \ | |
-d '{"ref":"main","inputs": { "DExecution_Env":"Sandbox", "DScenarioNameTest":"SmokeTests_Scenario" }}' |