Skip to content

Commit 3ffd789

Browse files
committed
Add manual trigger and prod release input to workflow
Added a `workflow_dispatch` trigger to the GitHub Actions workflow, enabling manual execution with a `prod_release` boolean input. This input allows users to specify whether to release to production, with a default value of `false`. Updated the `if` condition for the `build_and_deploy_job` to include the `prod_release` input. The job now runs if `prod_release` is `true` or for `pull_request` events (excluding the `closed` action), providing more control over workflow execution.
1 parent 91cd499 commit 3ffd789

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/azure-static-web-apps-calm-plant-04da70210.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ on:
88
types: [opened, synchronize, reopened, closed]
99
branches:
1010
- main
11+
workflow_dispatch:
12+
inputs:
13+
prod_release:
14+
description: 'Do you want to release to production?'
15+
required: true
16+
default: false
17+
type: boolean
1118

1219
jobs:
1320
build_and_deploy_job:
14-
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
21+
if: ${{ inputs.prod_release }} || (github.event_name == 'pull_request' && github.event.action != 'closed')
1522
runs-on: ubuntu-latest
1623
env:
1724
DOTNET_VERSION: "net10.0"

0 commit comments

Comments
 (0)