Skip to content

Commit 88c13af

Browse files
authored
Output binaries workflow decisions to summary (#14333)
1 parent d7ca873 commit 88c13af

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

.github/workflows/binaries.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,65 +67,78 @@ jobs:
6767
run: |
6868
if [[ "$GITHUB_WORKFLOW" == *"early access"* && "$REPO_OWNER" != "JabRef" ]]; then
6969
echo "🚫 Early access workflow for JabRef disabled for non-JabRef owner"
70+
echo "🚫 Early access workflow for JabRef disabled for non-JabRef owner" >> $GITHUB_STEP_SUMMARY
7071
echo "should-build=false" >> "$GITHUB_OUTPUT"
7172
exit 0
7273
fi
7374
7475
if [[ "$EVENT_NAME" != "labeled" || "$LABEL_NAME" == "automerge" || "$LABEL_NAME" == "dev: binaries" ]]; then
7576
echo "📦 build enabled"
77+
echo "📦 build enabled" >> $GITHUB_STEP_SUMMARY
7678
echo "should-build=true" >> "$GITHUB_OUTPUT"
7779
else
7880
echo "🚫 build should be skipped"
81+
echo "🚫 build should be skipped" >> $GITHUB_STEP_SUMMARY
7982
echo "should-build=false" >> "$GITHUB_OUTPUT"
8083
exit 0
8184
fi
8285
8386
if [ -z "$BUILDJABREFPRIVATEKEY" ]; then
87+
echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
88+
echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
8489
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
8590
echo "secretspresent=false" >> "$GITHUB_OUTPUT"
86-
echo "🚫 Secret BUILDJABREFPRIVATEKEY not present – skipping upload"
8791
exit 0
8892
fi
8993
echo "secretspresent=true" >> "$GITHUB_OUTPUT"
9094
9195
if [[ "$GITHUB_REF" == refs/heads/gh-readonly-queue* ]]; then
92-
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
9396
echo "🚫 merge queue – skipping upload"
97+
echo "🚫 merge queue – skipping upload" >> $GITHUB_STEP_SUMMARY
98+
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
9499
exit 0
95100
fi
96101
97102
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
103+
echo "tag bulid" >> $GITHUB_STEP_SUMMARY
98104
echo "tagbuild=true" >> "$GITHUB_OUTPUT"
99105
else
106+
echo "no tag bulid" >> $GITHUB_STEP_SUMMARY
100107
echo "tagbuild=false" >> "$GITHUB_OUTPUT"
101108
fi
102109
103110
if [[ "${GITHUB_REF}" == refs/tags/* ]] || [[ "${{ inputs.notarization }}" == "true" ]]; then
104111
# This workflow runs on ubuntu-latest even for notarization for macOS; need to check later if really on macOS
105112
echo "🧾 macOS notarization"
113+
echo "🧾 macOS notarization" >> $GITHUB_STEP_SUMMARY
106114
echo "should-notarize=true" >> "$GITHUB_OUTPUT"
107115
echo "☁️ will upload"
116+
echo "☁️ will upload" >> $GITHUB_STEP_SUMMARY
108117
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
109118
exit 0;
110119
else
111120
echo "🚫 no macOS notarization"
121+
echo "🚫 no macOS notarization" >> $GITHUB_STEP_SUMMARY
112122
echo "should-notarize=false" >> "$GITHUB_OUTPUT"
113123
fi
114124
115125
if [ "${{ github.event_name }}" != "pull_request" ]; then
116-
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
117126
echo "☁️ Non-PR event – will upload"
127+
echo "☁️ Non-PR event – will upload" >> $GITHUB_STEP_SUMMARY
128+
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
118129
exit 0
119130
fi
120131
121132
LABELS=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels --jq '.[].name')
122133
123134
if echo "$LABELS" | grep -q "^dev: binaries$"; then
124-
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
125135
echo "☁️ Label 'dev: binaries' found – will upload"
136+
echo "☁️ Label 'dev: binaries' found – will upload" >> $GITHUB_STEP_SUMMARY
137+
echo "upload-to-builds-jabref-org=true" >> "$GITHUB_OUTPUT"
126138
else
127-
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
128139
echo "🚫 Label 'dev: binaries' not found – skipping upload"
140+
echo "🚫 Label 'dev: binaries' not found – skipping upload" >> $GITHUB_STEP_SUMMARY
141+
echo "upload-to-builds-jabref-org=false" >> "$GITHUB_OUTPUT"
129142
fi
130143
131144
disk-space-check:
@@ -138,8 +151,9 @@ jobs:
138151
if: needs.conditions.outputs.upload-to-builds-jabref-org == 'false'
139152
shell: bash
140153
run: |
141-
echo "available=false" >> "$GITHUB_OUTPUT"
142154
echo "🚫 no upload – skipping upload"
155+
echo "🚫 no upload – skipping upload" >> $GITHUB_STEP_SUMMARY
156+
echo "available=false" >> "$GITHUB_OUTPUT"
143157
- name: Setup SSH key
144158
if: needs.conditions.outputs.upload-to-builds-jabref-org == 'true'
145159
run: |
@@ -152,13 +166,16 @@ jobs:
152166
USAGE=$(ssh -p 9922 -i sshkey -o StrictHostKeyChecking=no [email protected] \
153167
"df --output=pcent /var/www/builds.jabref.org | tail -n1 | tr -dc '0-9'")
154168
echo "Remote usage: ${USAGE}%"
169+
echo "Remote usage: ${USAGE}%" >> $GITHUB_STEP_SUMMARY
155170
156171
if [ "$USAGE" -lt 80 ]; then
157-
echo "available=true" >> "$GITHUB_OUTPUT"
158172
echo "☁️ enough disk space available – will upload"
173+
echo "☁️ enough disk space available – will upload" >> $GITHUB_STEP_SUMMARY
174+
echo "available=true" >> "$GITHUB_OUTPUT"
159175
else
160-
echo "available=false" >> "$GITHUB_OUTPUT"
161176
echo "🚫 not enough disk space – skipping upload"
177+
echo "🚫 not enough disk space – skipping upload" >> $GITHUB_STEP_SUMMARY
178+
echo "available=false" >> "$GITHUB_OUTPUT"
162179
fi
163180
164181
build:

0 commit comments

Comments
 (0)