1010 - uses : actions/upload-artifact@v3
1111 with :
1212 name : payload
13- path : ${{ github.event_path }}
13+ path : ${{ github.event_path }}
14+
15+ # name: Validate and Run Commands Based on PR Labels
16+
17+ # on:
18+ # pull_request:
19+ # types: [opened, synchronize, labeled, unlabeled]
20+
21+ # jobs:
22+ # validate-and-execute:
23+ # runs-on: ubuntu-latest
24+
25+ # steps:
26+ # - name: Checkout code
27+ # uses: actions/checkout@v3
28+
29+ # # - name: Get PR Labels
30+ # # id: get-labels
31+ # # uses: actions/github-script@v6
32+ # # with:
33+ # # script: |
34+ # # const labels = context.payload.pull_request.labels.map(label => label.name);
35+ # # return labels;
36+ # # result-encoding: string
37+
38+ # # - name: Determine Validation Type
39+ # # id: determine-validation-mode
40+ # # run: |
41+ # # labels="${{ steps.get-labels.outputs.result }}"
42+
43+ # # validation_mode="thorough"
44+ # # if echo "$labels" | grep -q "quick validation"; then
45+ # # validation_mode="individual"
46+ # # fi
47+
48+ # # echo "validation_mode=$validation_mode" | tee -a $GITHUB_OUTPUT
49+
50+ # # # Validate source and trigger test, skipping if there are no deployable changes
51+ # # - name: 'If deployable changes were made, push source to a scratch org'
52+ # # run: |
53+ # # labels="${{ steps.get-labels.outputs.result }}"
54+
55+ # # validation_mode="thorough"
56+ # # if echo "$labels" | grep -q "quick validation"; then
57+ # # validation_mode="individual"
58+ # # fi
59+ # # echo $validation_mode
60+
61+ # - name: Get SFP Pool Validation Mode from the PR labels
62+ # id: sfp-validation-mode
63+ # uses: actions/github-script@v7
64+ # with:
65+ # script: |
66+
67+ # const labels = context.payload.pull_request.labels.map(label => label.name);
68+ # const hasQuickValidation = labels.includes('quick validation');
69+ # const hasFullValidation = labels.includes('full validation');
70+
71+ # let validationMode = 'thorough';
72+
73+ # if (hasQuickValidation && !hasFullValidation) {
74+ # validationMode = 'individual';
75+ # }
76+
77+ # console.log(`SFP Validation Mode: ${validationMode}`);
78+ # return validationMode;
79+ # result-encoding: string
80+
81+ # - name: Run Commands Based on the Validation Mode
82+ # run: |
83+ # echo "Running commands based on the validation mode: ${{ steps.sfp-validation-mode.outputs.result }}"
0 commit comments