forked from github/safe-settings
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
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 |