Skip to content

Commit 6094578

Browse files
authored
Refactor: Azure deploy from GitHub Actions (#459)
2 parents bfcd2b4 + 367af9b commit 6094578

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

.github/workflows/docker-publish.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ jobs:
8080
file: Dockerfile
8181
push: true
8282
tags: |
83-
ghcr.io/${{ github.repository }}:${{ github.ref_type != 'tag' && github.ref_name || contains(github.ref, '-rc') && 'test' || 'prod' }}
84-
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
8583
ghcr.io/${{ github.repository }}:${{ github.sha }}
84+
85+
- name: Deploy to MST Azure Web App
86+
uses: azure/webapps-deploy@v2
87+
with:
88+
app-name: ${{ vars.MST_AZURE_WEBAPP_NAME }}
89+
images: ghcr.io/${{ github.repository }}:${{ github.sha }}
90+
publish-profile: ${{ secrets.MST_AZURE_WEBAPP_PUBLISH_PROFILE }}
91+
92+
- name: Deploy to SBMTD Azure Web App
93+
uses: azure/webapps-deploy@v2
94+
with:
95+
app-name: ${{ vars.SBMTD_AZURE_WEBAPP_NAME }}
96+
images: ghcr.io/${{ github.repository }}:${{ github.sha }}
97+
publish-profile: ${{ secrets.SBMTD_AZURE_WEBAPP_PUBLISH_PROFILE }}

terraform/.terraform.lock.hcl

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform/app_service.tf

+1-6
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,10 @@ resource "azurerm_linux_web_app" "main" {
4141
action = "Allow"
4242
service_tag = "ApplicationInsightsAvailability"
4343
}
44-
45-
application_stack {
46-
docker_image = "ghcr.io/cal-itp/eligibility-server"
47-
docker_image_tag = local.env_name
48-
}
4944
}
5045

5146
app_settings = {
52-
"DOCKER_ENABLE_CI" = "true",
47+
"DOCKER_ENABLE_CI" = "false",
5348
"DOCKER_REGISTRY_SERVER_URL" = "https://ghcr.io/"
5449
"ELIGIBILITY_SERVER_SETTINGS" = "${local.mount_path}/settings.py"
5550
# this prevents the filesystem from being obscured by a mount

terraform/pipeline/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ stages:
3434
- task: TerraformInstaller@0
3535
displayName: Install Terraform
3636
inputs:
37-
terraformVersion: 1.3.1
37+
terraformVersion: 1.8.5
3838
# https://github.com/microsoft/azure-pipelines-terraform/tree/main/Tasks/TerraformTask/TerraformTaskV3#readme
3939
- task: TerraformTaskV3@3
4040
displayName: Terraform init

0 commit comments

Comments
 (0)