-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.44 KB
/
Copy pathvalidate.yaml
File metadata and controls
41 lines (40 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: validate
on:
workflow_call:
inputs:
environment:
required: false
type: string
sha:
required: false
type: string
version:
required: false
type: string
dry_run:
required: false
type: boolean
default: false
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Stub validate
run: |
echo "validating environment=${{ inputs.environment }} sha=${{ inputs.sha }} version=${{ inputs.version }}"
# Abort-path test hook. The scenario suite commits a tracked sentinel
# file (.cascade-validate-fail) to trunk in the same merge that drives
# the abort-path orchestrate run, then removes it. validate checks out
# the triggering commit, so when the file is present this stub exits
# non-zero and the suite can prove on_failure: abort skips every
# downstream build/deploy and fails the run. A committed file is used
# rather than a repository variable so the suite needs only the
# contents scope it already holds, not actions:write for variables.
SENTINEL_FILE=".cascade-validate-fail"
if [ -f "$SENTINEL_FILE" ]; then
echo "::error::validate sentinel file present ($(cat "$SENTINEL_FILE")); failing to exercise on_failure: abort"
exit 1
fi
sleep 1