Skip to content

Commit

Permalink
add a basic deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
torgst authored and admtorgst committed Sep 14, 2024
1 parent 00ef590 commit ad5f509
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Deploy safe settings app"
on:
push:
branches:
- main

jobs:
deploy:
name: Deploy new image
environment: prod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Log in to Azure using OIDC
uses: azure/login@v2
with:
client-id: ${{ secrets.DEPLOY_APP_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_AD_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Login to Azure Container Registry
run: az acr login --name hsoghacr

- name: Build docker image
run: docker build -t hsoghacr.azurecr.io/safesettings:latest .

- name: Push image
run: docker push hsoghacr.azurecr.io/safesettings:latest

- name: Restart app to load the new image
run: az webapp restart -n hso-gh-config-app -g hso-gh-config

0 comments on commit ad5f509

Please sign in to comment.