@@ -43,16 +43,15 @@ inputs:
43
43
outputs :
44
44
buildScanFirstBuild :
45
45
description : " First build scan url"
46
- value : ${{ steps.run .outputs.buildScanFirstBuild }}
46
+ value : ${{ steps.summary .outputs.buildScanFirstBuild }}
47
47
buildScanSecondBuild :
48
48
description : " Second build scan url"
49
- value : ${{ steps.run .outputs.buildScanSecondBuild }}
49
+ value : ${{ steps.summary .outputs.buildScanSecondBuild }}
50
50
51
51
runs :
52
52
using : " composite"
53
53
steps :
54
54
- name : Run Gradle Experiment 3
55
- id : run
56
55
run : |
57
56
# Read the action inputs
58
57
ARG_GIT_REPO=""
@@ -105,9 +104,6 @@ runs:
105
104
# Navigate into the folder containing the validation scripts
106
105
cd develocity-gradle-build-validation
107
106
108
- # Do not exit on error to allow post-actions
109
- set +e
110
-
111
107
# Run the experiment
112
108
./03-validate-local-build-caching-different-locations.sh \
113
109
${ARG_GIT_REPO:+"-r" "$ARG_GIT_REPO"} \
@@ -121,16 +117,6 @@ runs:
121
117
${ARG_DEVELOCITY_ENABLE:+"-e"} \
122
118
${ARG_FAIL_IF_NOT_FULLY_CACHEABLE:+"-f"} \
123
119
${RUNNER_DEBUG:+"--debug"}
124
- EXPERIMENT_EXIT_CODE=$?
125
-
126
- # Set the Build Scan urls as outputs
127
- BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | sed 's/.* //')
128
- BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | sed 's/.* //')
129
-
130
- echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT
131
- echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT
132
-
133
- exit $EXPERIMENT_EXIT_CODE
134
120
shell : bash
135
121
- name : Archive receipt
136
122
id : upload-artifact
@@ -139,13 +125,21 @@ runs:
139
125
with :
140
126
name : experiment-3-receipt-${{ github.job }}${{ strategy.job-total > 1 && format('-{0}', strategy.job-index) || '' }}
141
127
path : develocity-gradle-build-validation/.data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt
142
- - name : Fill GitHub summary
128
+ - name : Fill GitHub summary and outputs
129
+ id : summary
143
130
if : always()
144
131
run : |
145
132
RECEIPT_FILE="develocity-gradle-build-validation/.data/03-validate-local-build-caching-different-locations/latest/exp3-*.receipt"
146
133
if [ -f ${RECEIPT_FILE} ]; then
147
134
cat ${RECEIPT_FILE} >> $GITHUB_STEP_SUMMARY
148
135
echo "-------------" >> $GITHUB_STEP_SUMMARY
149
136
echo "Download receipt: ${{ steps.upload-artifact.outputs.artifact-url }}" >> $GITHUB_STEP_SUMMARY
137
+
138
+ # Set the Build Scan urls as outputs
139
+ BUILD_SCAN_1=$(grep -m 1 "first build" ${RECEIPT_FILE} | grep -o 'http.\S\+')
140
+ BUILD_SCAN_2=$(grep -m 1 "second build" ${RECEIPT_FILE} | grep -o 'http.\S\+')
141
+
142
+ echo "buildScanFirstBuild=$BUILD_SCAN_1" >> $GITHUB_OUTPUT
143
+ echo "buildScanSecondBuild=$BUILD_SCAN_2" >> $GITHUB_OUTPUT
150
144
fi
151
145
shell : bash
0 commit comments