Skip to content

Commit

Permalink
Refactor: Azure deploy from GitHub Actions (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman authored Jun 7, 2024
2 parents bfcd2b4 + 367af9b commit 6094578
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ jobs:
file: Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ github.ref_type != 'tag' && github.ref_name || contains(github.ref, '-rc') && 'test' || 'prod' }}
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
ghcr.io/${{ github.repository }}:${{ github.sha }}
- name: Deploy to MST Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ vars.MST_AZURE_WEBAPP_NAME }}
images: ghcr.io/${{ github.repository }}:${{ github.sha }}
publish-profile: ${{ secrets.MST_AZURE_WEBAPP_PUBLISH_PROFILE }}

- name: Deploy to SBMTD Azure Web App
uses: azure/webapps-deploy@v2
with:
app-name: ${{ vars.SBMTD_AZURE_WEBAPP_NAME }}
images: ghcr.io/${{ github.repository }}:${{ github.sha }}
publish-profile: ${{ secrets.SBMTD_AZURE_WEBAPP_PUBLISH_PROFILE }}
1 change: 1 addition & 0 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions terraform/app_service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,10 @@ resource "azurerm_linux_web_app" "main" {
action = "Allow"
service_tag = "ApplicationInsightsAvailability"
}

application_stack {
docker_image = "ghcr.io/cal-itp/eligibility-server"
docker_image_tag = local.env_name
}
}

app_settings = {
"DOCKER_ENABLE_CI" = "true",
"DOCKER_ENABLE_CI" = "false",
"DOCKER_REGISTRY_SERVER_URL" = "https://ghcr.io/"
"ELIGIBILITY_SERVER_SETTINGS" = "${local.mount_path}/settings.py"
# this prevents the filesystem from being obscured by a mount
Expand Down
2 changes: 1 addition & 1 deletion terraform/pipeline/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ stages:
- task: TerraformInstaller@0
displayName: Install Terraform
inputs:
terraformVersion: 1.3.1
terraformVersion: 1.8.5
# https://github.com/microsoft/azure-pipelines-terraform/tree/main/Tasks/TerraformTask/TerraformTaskV3#readme
- task: TerraformTaskV3@3
displayName: Terraform init
Expand Down

0 comments on commit 6094578

Please sign in to comment.