forked from openvinotoolkit/anomalib
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.03 KB
/
_reusable-release-status.yaml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Release Status Workflow
#
# This reusable workflow validates and reports the status of release processes,
# handling both RC and production releases.
#
# Key Features:
# - Status verification
# - Error detection
# - Release type handling
# - Status reporting
# - Process validation
#
# Process Stages:
# 1. Status Collection:
# - RC status check
# - Production status check
# - Process completion verification
#
# 2. Validation:
# - Error detection
# - Status analysis
# - Release type determination
#
# 3. Reporting:
# - Status summary
# - Error reporting
# - Success confirmation
#
# Required Inputs:
# - version: Release version
# - rc-status: RC process status
# - prod-status: Production process status
#
# Example Usage:
# 1. Status Check:
# jobs:
# status:
# uses: ./.github/workflows/_reusable-release-status.yaml
# with:
# version: "v1.2.3"
# rc-status: "success"
# prod-status: "success"
#
# Note: Should be used as final step in release workflows
name: Release Status Check
on:
workflow_call:
inputs:
version:
required: true
type: string
rc-status:
required: true
type: string
prod-status:
required: true
type: string
beta-status:
required: true
type: string
jobs:
check-status:
runs-on: ubuntu-latest
steps:
- name: Verify workflow status
run: |
if [[ "${{ inputs.rc-status }}" == "failure" || "${{ inputs.prod-status }}" == "failure" || "${{ inputs.beta-status }}" == "failure" ]]; then
echo "::error::Release workflow failed"
exit 1
fi
if [[ "${{ inputs.version }}" =~ -rc ]]; then
echo "Release candidate ${{ inputs.version }} processed successfully"
elif [[ "${{ inputs.version }}" =~ b[0-9]+ ]]; then
echo "Beta release ${{ inputs.version }} processed successfully"
else
echo "Production release ${{ inputs.version }} completed successfully"
fi