Skip to content

Commit fbe80e7

Browse files
committed
Add commit info to Discord notification
1 parent e613f69 commit fbe80e7

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

.github/workflows/pure.yml

+18-9
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
outputs:
3232
hol_sha: ${{ steps.shas.outputs.HOL_SHA }}
3333
cakeml_sha: ${{ steps.shas.outputs.CAKEML_SHA }}
34+
hol_short_sha: ${{ steps.shas.outputs.HOL_SHORT_SHA }}
35+
cakeml_short_sha: ${{ steps.shas.outputs.CAKEML_SHORT_SHA }}
3436

3537
steps:
3638
- name: Update PATH
@@ -70,6 +72,16 @@ jobs:
7072
repository: CakeML/CakeML
7173
path: cakeml
7274

75+
- name: Record HOL/CakeML checkouts
76+
id: shas
77+
run: |
78+
cd $HOLDIR
79+
echo "HOL_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
80+
echo "HOL_SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
81+
cd $CAKEMLDIR
82+
echo "CAKEML_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
83+
echo "CAKEML_SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
84+
7385
- name: Build HOL4
7486
run: |
7587
cd $HOLDIR
@@ -186,14 +198,6 @@ jobs:
186198
touch lib/basis_ffi.c
187199
cd benchmark && ./benchmark.py --mode compile
188200
189-
- name: Record HOL/CakeML checkouts
190-
id: shas
191-
run: |
192-
cd $HOLDIR
193-
echo "HOL_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
194-
cd $CAKEMLDIR
195-
echo "CAKEML_SHA=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
196-
197201
release:
198202
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master'
199203
needs: build
@@ -253,6 +257,11 @@ jobs:
253257
\"color\": ${{ needs.build.result == 'success' && 8311585 || 13632027 }},
254258
\"author\": {
255259
\"name\": \"PureCake CI\",
256-
\"url\": \"https://github.com/CakeML/pure/actions/workflows/pure.yml\"}
260+
\"url\": \"https://github.com/CakeML/pure/actions/workflows/pure.yml\"},
261+
\"fields\": [
262+
{\"name\": \"HOL commit\", \"inline\": true,
263+
\"value\": \"[${{ needs.build.outputs.hol_short_sha }}](https://github.com/HOL-Theorem-Prover/HOL/commit/${{ needs.build.outputs.hol_sha }})\"},
264+
{\"name\": \"CakeML commit\", \"inline\": true,
265+
\"value\": \"[${{ needs.build.outputs.cakeml_short_sha }}](https://github.com/CakeML/cakeml/commit/${{ needs.build.outputs.cakeml_sha }})\"}]
257266
}]}"
258267
${{ secrets.DISCORD_WEBHOOK }}

0 commit comments

Comments
 (0)