Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit f446cd6

Browse files
committed
add a gate to the production workflow filename
1 parent f21865d commit f446cd6

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

config.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,24 @@ steps:
252252
actions:
253253

254254
# We validate
255-
#- type: gate
255+
- type: getFileContents
256+
action_id: fileContents
257+
filename: '.github/workflows/deploy-prod.yml'
258+
required: false
259+
260+
# We validate that trigger is correct
261+
- type: gate
262+
every: true
263+
gate:
264+
- left: '%payload.pull_request.title%'
265+
operator: ===
266+
right: Production deployment workflow
267+
- left: '%actions.fileContents%'
268+
else:
269+
- type: respond
270+
with: 0Xe_unexpected.md
271+
data:
272+
expected: commit the file `.github/workflows/deploy-prod.yml` on a pull request titled "Production deployment workflow"
256273

257274
# Step 10: Choose the environment for AWS
258275

0 commit comments

Comments
 (0)