Skip to content

Commit

Permalink
Merge pull request #436 from DFE-Digital/feature/restart-service-work…
Browse files Browse the repository at this point in the history
…flow

Create workflow to restart service (bypassed PR checks because time constraints)
  • Loading branch information
RobertGHippo authored Oct 25, 2024
2 parents 1051c70 + 76047f4 commit bf82532
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/restart-service.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
run-name: 'Restart Service - ${{inputs.environment}}'
name: 'Restart Service'

on:
workflow_dispatch:
inputs:
environment:
description: 'Azure deployment environment'
required: true
default: 'development'
type: choice
options:
- development
- staging
- production

jobs:

restart-service:
name: Restart
runs-on: ubuntu-22.04
environment: ${{ inputs.environment }}
# Permissions for OIDC authentication
permissions:
id-token: write
contents: write
issues: write
steps:
# Login to Azure using OIDC
- name: Login to Azure CLI
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}

- name: Restart Service
run: |
az webapp restart --resource-group ${{ vars.RESOURCE_NAME_PREFIX }}-rg --name ${{ vars.WEBAPP_NAME }}

0 comments on commit bf82532

Please sign in to comment.