File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Verify.Redist.Update"
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - master
7+ paths :
8+ - ' redist/**'
9+ types :
10+ - opened
11+ - synchronize
12+ - reopened
13+ - ready_for_review
14+
15+ jobs :
16+ verify :
17+ if : startsWith(github.head_ref, 'redist-update/')
18+ runs-on : ubuntu-latest
19+ permissions :
20+ pull-requests : write
21+ contents : read
22+
23+ steps :
24+ - name : Checkout code
25+ uses : actions/checkout@v4
26+
27+ - name : Validate redist update
28+ run : |
29+ echo "🔍 Verifying redist update..."
30+
31+ VARIANT=$(echo "${GITHUB_HEAD_REF}" | cut -d'/' -f2 | cut -d'-' -f2-)
32+ echo "Detected variant: $VARIANT"
33+
34+ case "$VARIANT" in
35+ client-preview) REDIST_DIR="redist/redist-client-preview" ;;
36+ server-preview) REDIST_DIR="redist/redist-server-preview" ;;
37+ client-preview-old) REDIST_DIR="redist/redist-client-preview-old" ;;
38+ server-preview-old) REDIST_DIR="redist/redist-server-preview-old" ;;
39+ client) REDIST_DIR="redist/redist-client" ;;
40+ server) REDIST_DIR="redist/redist-server" ;;
41+ *)
42+ echo "Unknown variant: $VARIANT"
43+ exit 1
44+ ;;
45+ esac
46+
47+ echo "Checking directory: $REDIST_DIR"
48+ if [[ ! -f "$REDIST_DIR/README.md" ]]; then
49+ echo "Missing README.md file in $REDIST_DIR!"
50+ exit 1
51+ fi
52+
53+ # - name: Auto-approve PR
54+ # if: success() && github.actor == 'github-actions[bot]'
55+ # uses: hmarr/auto-approve-action@v4
56+ # with:
57+ # github-token: ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments