Skip to content

Restart Service - development #1

Restart Service - development

Restart Service - development #1

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 }}