Skip to content

Commit 4e51eff

Browse files
authored
Make sure code is being deployed to the directory only on Release PR Merge (#593)
* Remove ability to manually dispatch deploy action * Group conditions to avoid unwanted OR ops
1 parent 9ff52eb commit 4e51eff

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/deploy-to-dotorg.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
name: Deploy to WordPress.org
22

33
on:
4-
workflow_dispatch:
5-
inputs:
6-
release_type:
7-
description: 'Release type'
8-
required: true
9-
type: choice
10-
options:
11-
- major
12-
- minor
13-
- patch
144
pull_request:
155
types: [closed]
166
branches:
@@ -22,8 +12,8 @@ jobs:
2212
github.event_name == 'pull_request' &&
2313
github.event.pull_request.merged == true &&
2414
startsWith(github.event.pull_request.head.ref, 'release/') &&
25-
contains(github.event.pull_request.head.ref, '/major') || contains(github.event.pull_request.head.ref, '/minor') || contains(github.event.pull_request.head.ref, '/patch') &&
26-
(github.event.pull_request.user.login == 'github-actions[bot]')
15+
( contains(github.event.pull_request.head.ref, '/major') || contains(github.event.pull_request.head.ref, '/minor') || contains(github.event.pull_request.head.ref, '/patch') ) &&
16+
( github.event.pull_request.user.login == 'github-actions[bot]' )
2717
runs-on: ubuntu-latest
2818
steps:
2919
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)