-
Notifications
You must be signed in to change notification settings - Fork 5
699 lines (640 loc) · 25.7 KB
/
release-on-tag.yaml
File metadata and controls
699 lines (640 loc) · 25.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
name: 'Release HarperDB'
on:
push:
tags:
- release_*
workflow_dispatch:
inputs:
forcedVersion:
type: string
description: 'Force a release with this version (x.y.z[-<alpha|beta|rc|custom>.w]). Please make sure you know what you are doing. This process will not tag latest. Defaults to `no_forced`'
default: 'no_forced'
required: false
dryrun:
type: boolean
description: "dryrun: Do not publish"
default: true
jobs:
########
# Meta
########
meta:
runs-on: ubuntu-latest
outputs:
harperdbVersion: ${{ steps.get-values.outputs.harperdbVersion }}
version: ${{ steps.get-values.outputs.version }}
full_version: ${{ steps.get-values.outputs.full_version }}
version_major: ${{ steps.get-values.outputs.version_major }}
version_minor: ${{ steps.get-values.outputs.version_minor }}
version_patch: ${{ steps.get-values.outputs.version_patch }}
release_type: ${{ steps.get-values.outputs.release_type }}
prerelease_version: ${{ steps.get-values.outputs.prerelease_version }}
npm_extra_tags: ${{ steps.get-values.outputs.npm_extra_tags }}
dockerhub_tag_latest: ${{ steps.get-values.outputs.dockerhub_tag_latest }}
dryrun: ${{ steps.get-values.outputs.dryrun }}
push: ${{ steps.get-values.outputs.push }}
steps:
- uses: actions/checkout@v4
- name: 'Get values'
id: get-values
env:
docker_repo_url: 'https://hub.docker.com/v2/namespaces/harperdb/repositories/harperdb/tags?page_size=100'
inputs_dryrun: ${{ inputs.dryrun }}
tag: ${{ github.ref }}
forcedVersion: ${{ inputs.forcedVersion }}
run: |
#!/usr/bin/env bash
# set default
dryrun='true'
push='false'
# make sure we know what the value of dryrun is
if [[ "${inputs_dryrun}" == "false" ]]; then
dryrun='false'
push='true'
fi
# get the version from package.json
harperdbVersion=$(jq -r '.version' package.json)
# check for forcedVersion. override tag and harperdbVersion to match
if [[ "${forcedVersion}" != "no_forced" && -n "${forcedVersion}" ]]; then
tag="refs/tags/release_${forcedVersion}"
harperdbVersion="${forcedVersion}"
cat <<EOF >> "${GITHUB_STEP_SUMMARY}"
> [!CAUTION]
> Forced Version
> version == "${harperdbVersion}"
EOF
dryrun="${inputs_dryrun:-false}"
[[ "${dryrun}" == 'false' ]] && push='true'
# this workflow needs a tag to function properly, in the case of being on a pushed tag, lets just check the tag
elif [[ "${tag}" =~ ^refs/tags/release_.*$ ]]; then
dryrun="${inputs_dryrun:-false}"
[[ "${dryrun}" == 'false' ]] && push='true'
else
cat <<EOF >> "${GITHUB_STEP_SUMMARY}"
> [!CAUTION]
> Exiting as I am unable to determine the version:
> tag == "${tag}"
> harperdbVersion == "${harperdbVersion}"
> dryrun == "${dryrun}"
> push == "${push}"
EOF
exit 1
fi
cat <<EOF >> "${GITHUB_STEP_SUMMARY}"
dryrun=${dryrun}
push=${push}
harperdbVersion=${harperdbVersion}
EOF
full_version=${tag#refs/*/release_}
release_type='stable'
prerelease_version=''
if [[ "${full_version}" == *"-"* ]]; then
prerelease_version_string="${full_version##*-}"
prerelease_version="${prerelease_version_string##*.}"
release_type="${prerelease_version_string%%.*}"
fi
version="${full_version%%-*}"
version="${version#[vV]}"
version_major="${version%%.*}"
version_minor="${version#*.}"
version_minor="${version_minor%.*}"
version_patch="${version##*.}"
npm_extra_tags=''
dockerhub_tag_latest=''
if [[ "${release_type}" == @(alpha|beta|rc|custom) ]]; then
npm_extra_tags='next'
[[ "${forcedVersion}" != "no_forced" ]] && npm_extra_tags=''
dockerhub_tag_latest=false
else
# before we set to latest, we need to make sure that this isn't just a new stable release on an older release train
repo_data_json=$(curl -sL "${docker_repo_url}")
current_latest_image_digest=$(echo "${repo_data_json}" | jq -r '.results[] | select(.name == "latest").digest')
# Extract the highest semantic version tag that shares the same digest as 'latest'
# This filters out commit hash tags and ensures we only compare actual version numbers
# To verify locally:
# docker_repo_url='https://hub.docker.com/v2/namespaces/harperdb/repositories/harperdb/tags?page_size=100'
# repo_data_json=$(curl -sL "${docker_repo_url}")
# current_latest_image_digest=$(echo "${repo_data_json}" | jq -r '.results[] | select(.name == "latest").digest')
# echo "${repo_data_json}" | jq -r ".results[] | select(.digest == \"${current_latest_image_digest}\" and .name != \"latest\") | .name" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1
current_latest_image_tag=$(echo "${repo_data_json}" | jq -r ".results[] | select(.digest == \"${current_latest_image_digest}\" and .name != \"latest\") | .name" | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
current_latest_image_tag_major="${current_latest_image_tag%%\.*}"
current_latest_image_tag_minor="${current_latest_image_tag#*.}"
current_latest_image_tag_minor="${current_latest_image_tag_minor%.*}"
current_latest_image_tag_patch="${current_latest_image_tag##*.}"
if [ "${version_major}" -gt "${current_latest_image_tag_major}" ]; then
npm_extra_tags='latest+stable'
dockerhub_tag_latest=true
elif [ "${version_major}" -eq "${current_latest_image_tag_major}" ] \
&& [ "${version_minor}" -gt "${current_latest_image_tag_minor}" ]; then
npm_extra_tags='latest+stable'
dockerhub_tag_latest=true
elif [ "${version_major}" -eq "${current_latest_image_tag_major}" ] \
&& [ "${version_minor}" -eq "${current_latest_image_tag_minor}" ] \
&& [ "${version_patch}" -ge "${current_latest_image_tag_patch}" ]; then
npm_extra_tags='latest+stable'
dockerhub_tag_latest=true
else
npm_extra_tags='none'
dockerhub_tag_latest=false
fi
fi
cat <<EOF >> "${GITHUB_OUTPUT}"
harperdbVersion=${harperdbVersion}
version=${version}
full_version=${full_version}
version_major=${version_major}
version_minor=${version_minor}
version_patch=${version_patch}
release_type=${release_type}
prerelease_version=${prerelease_version}
npm_extra_tags=${npm_extra_tags}
dockerhub_tag_latest=${dockerhub_tag_latest}
dryrun=${dryrun}
push=${push}
EOF
cat <<EOF >> "${GITHUB_STEP_SUMMARY}"
## Release ${version} ##
harperdbVersion: ${harperdbVersion}
version from tag: ${full_version}
> release type: ${release_type}
> npm tag: ${npm_extra_tags}
> dockerhub latest tag: ${dockerhub_tag_latest}
---
major: ${version_major}
minor: ${version_minor}
patch: ${version_patch}
EOF
[[ "${release_type}" != "stable" ]] && echo "pre-release version: ${release_type}.${prerelease_version:-}" >> "${GITHUB_STEP_SUMMARY}"
cat <<EOF
harperdbVersion: ${harperdbVersion}
version: ${version}
full_version: ${full_version}
version_major: ${version_major}
version_minor: ${version_minor}
version_patch: ${version_patch}
release_type: ${release_type}
prerelease_version: ${prerelease_version}
npm_extra_tags: ${npm_extra_tags}
dockerhub_tag_latest: ${dockerhub_tag_latest}
dryrun: ${dryrun}
push: ${push}
inputs_dryrun: ${inputs_dryrun}
EOF
if [[ "${dryrun}" != "false" ]]; then
cat <<EOF >> "${GITHUB_STEP_SUMMARY}"
> [!WARNING]
> dryrun == "${dryrun}"
EOF
fi
if [[ "${full_version}" != "${harperdbVersion}" ]]; then
cat <<EOF >> "${GITHUB_STEP_SUMMARY}"
> [!CAUTION]
> Terminating job as the version from the tag (${tag}, derived version ${full_version}) does not match harperdbVersion (${harperdbVersion})
EOF
exit 1
fi
############################################
# Send Slack Message for start of Release
############################################
sendSlackMessageRealeaseStarted:
if: ${{ needs.meta.outputs.dryrun == 'false' }}
uses: ./.github/workflows/post-to-slack-channel.yaml
needs:
- meta
secrets: inherit
with:
channel_id: C05PLHLQFQA
payload: |
{
"text": "${{ github.run_id }} Release ${{ needs.meta.outputs.full_version }} In Progress.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "HarperDB Release ${{ needs.meta.outputs.full_version }}"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Status*"
},
{
"type": "mrkdwn",
"text": "In Progress"
},
{
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run ${{ github.run_id }}>"
}
]
}
]
}
####################
# Build HarperDB
####################
build:
needs:
- meta
uses: ./.github/workflows/build.yaml
with:
artifactVersionOverride: ${{ needs.meta.outputs.harperdbVersion }}
# # These values should only be used to debug the workflow
# preferDownload: true
# dummyLicense: true
#############################################################
# Build offline installer to
# https://products-harperdb-io.s3.us-east-2.amazonaws.com/
#############################################################
build-offline-installer:
runs-on: ubuntu-latest
if: ${{ inputs.forcedVersion != 'no_forced' }}
needs:
- meta
- build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Build artifact
run: |
#!/bin/bash
./utility/devops/build/all-in-one-build.sh
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: offline-harperdb-${{ needs.meta.outputs.harperdbVersion }}.tgz
path: harperdb-${{ needs.build.outputs.harperdbVersion }}.tgz
retention-days: 1
##############################################
# Release to Private NPM harperdb/@harperdb
##############################################
npmPrivateRelease:
continue-on-error: true
needs:
- meta
- build
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: harperdb-${{ needs.meta.outputs.harperdbVersion }}.tgz
- uses: actions/setup-node@v4
with:
node-version: '${{needs.build.outputs.nodeVersion}}'
registry-url: 'https://registry.npmjs.org'
- name: 'npm Publish'
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_ACCESS_KEY }}'
HARPERDB_VERSION: '${{ needs.meta.outputs.harperdbVersion }}'
PUBLISH_DESTINATION: 'private'
EXTRA_TAGS: "${{ needs.meta.outputs.npm_extra_tags }}"
DRYRUN: "${{ needs.meta.outputs.dryrun }}"
run: ./.github/scripts/npm-publish.sh
#########################################
# Release to dockerhub harperdb/private
#########################################
dockerhubPrivateRelease:
needs:
- meta
- build
strategy:
matrix:
nodeVersion: [16, 20, 22, 24, 25]
dockerFile: ['utility/Docker/Dockerfile']
include:
- nodeVersion: 16
dockerFile: 'utility/Docker/Dockerfile-node16'
timeout-minutes: 30
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: docker-build
uses: ./.github/docker-build
with:
harperdbVersion: ${{ needs.meta.outputs.harperdbVersion }}
nodeVersion: ${{ matrix.nodeVersion }}
dockerFile: ${{ matrix.dockerFile }}
containerImage: 'harperdb/private'
tagLatest: ${{ needs.meta.outputs.dockerhub_tag_latest == 'true' && true || false }}
buildPlatforms: 'linux/amd64,linux/arm64'
push: ${{ needs.meta.outputs.push == 'true' && 'true' || 'false' }}
dockerUsername: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}
############################################
# Send Slack Message on 'Ready to Deploy'
############################################
sendSlackMessageReadyToDeploy:
if: ${{ needs.meta.outputs.release_type == 'stable' && needs.meta.outputs.dryrun == 'false' }}
uses: ./.github/workflows/post-to-slack-channel.yaml
secrets: inherit
needs:
- meta
- npmPrivateRelease
- dockerhubPrivateRelease
- sendSlackMessageRealeaseStarted
with:
channel_id: C05PLHLQFQA
update_ts: ${{ needs.sendSlackMessageRealeaseStarted.outputs.ts }}
payload: |
{
"text": "${{ github.run_id }} Release ${{ needs.meta.outputs.full_version }} requires review.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "HarperDB Release ${{ needs.meta.outputs.full_version }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Review(s) Required*"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"text": "Review Release"
},
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"style": "primary"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Status*"
},
{
"type": "mrkdwn",
"text": "In progress"
},
{
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run ${{ github.run_id }}>"
}
]
}
]
}
##############################################################
#
# ██████ ██ ██ ██████ ██ ██ ██████
# ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██████ ██ ██ ██████ ██ ██ ██
# ██ ██ ██ ██ ██ ██ ██ ██
# ██ ██████ ██████ ███████ ██ ██████
#
#
# ██████ ███████ ██ ███████ █████ ███████ ███████
# ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██████ █████ ██ █████ ███████ ███████ █████
# ██ ██ ██ ██ ██ ██ ██ ██ ██
# ██ ██ ███████ ███████ ███████ ██ ██ ███████ ███████
#
##############################################################
###################################
# Release to Public NPM harperdb
###################################
publicReleaseNPM:
environment: ${{ needs.meta.outputs.release_type == 'stable' && 'release-npm' || 'pre-release-npm' }}
continue-on-error: true
needs:
- build
- meta
- npmPrivateRelease
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
# setup for publishing to npm
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: harperdb-${{ needs.meta.outputs.harperdbVersion }}.tgz
# setup and publishing to npm
- uses: actions/setup-node@v4
with:
node-version: '${{needs.build.outputs.nodeVersion}}'
registry-url: 'https://registry.npmjs.org'
- name: 'npm Publish'
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_ACCESS_KEY }}'
HARPERDB_VERSION: '${{ needs.meta.outputs.harperdbVersion }}'
PUBLISH_DESTINATION: 'public'
EXTRA_TAGS: "${{ needs.meta.outputs.npm_extra_tags }}"
DRYRUN: ${{ needs.meta.outputs.dryrun }}
run: ./.github/scripts/npm-publish.sh
###################################
# Release to Public Dockerhub
# harpersystems/harper
# harpersystems/harper-openshift
# harpersystems/harper-chrome (amd64 only)
# Publish to Redhat Connect
###################################
publicReleaseDocker:
environment: ${{ needs.meta.outputs.release_type == 'stable' && 'release-docker' || 'pre-release-docker' }}
needs:
- build
- meta
- dockerhubPrivateRelease
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 30
strategy:
matrix:
container:
- 'harpersystems/harper'
- 'harpersystems/harper-openshift'
nodeVersion: [ 16, 20, 22, 24, 25 ]
include:
- container: 'harpersystems/harper'
dockerFile: 'utility/Docker/Dockerfile'
buildPlatforms: 'linux/amd64,linux/arm64'
- container: 'harpersystems/harper-openshift'
dockerFile: 'utility/Docker/Dockerfile-openshift'
buildPlatforms: 'linux/amd64,linux/arm64'
- container: 'harpersystems/harper-chrome'
dockerFile: 'utility/Docker/Dockerfile-chrome'
buildPlatforms: 'linux/amd64'
nodeVersion: 22
- nodeVersion: 16
dockerFile: 'utility/Docker/Dockerfile-node16'
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: docker-build
uses: ./.github/docker-build
with:
harperdbVersion: ${{ needs.meta.outputs.harperdbVersion }}
nodeVersion: ${{ matrix.nodeVersion }}
dockerFile: ${{ matrix.dockerFile }}
containerImage: ${{ matrix.container }}
tagLatest: ${{ needs.meta.outputs.dockerhub_tag_latest == 'true' && true || false }}
buildPlatforms: 'linux/amd64,linux/arm64'
push: ${{ needs.meta.outputs.push == 'true' && 'true' || 'false' }}
pushRedhatConnect: ${{ matrix.nodeVersion == 22 && 'true' || 'false' }} # only checking node version here, docker-build action will check if harpersystems/harper-openshift
dockerUsername: ${{ secrets.DOCKER_USERNAME }}
dockerPassword: ${{ secrets.DOCKER_PASSWORD }}
publishToRedHatConnect:
needs:
- build
- publicReleaseDocker
uses: ./.github/workflows/publish-redhat-connect-images.yaml
with:
container_tag: ${{ needs.build.outputs.harperdbVersion }}
secrets:
REDHAT_CONNECT_DOCKERCONFIG_JSON: ${{ secrets.REDHAT_CONNECT_DOCKERCONFIG_JSON }}
REDHAT_PYXIS_KEY: ${{ secrets.REDHAT_PYXIS_KEY }}
#############################################################
# Release offline installer to
# https://products-harperdb-io.s3.us-east-2.amazonaws.com/
#############################################################
publicReleaseOfflineInstaller:
if: ${{ inputs.forcedVersion != 'no_forced' }}
environment: ${{ needs.meta.outputs.release_type == 'stable' && 'release-offline-installer' || 'pre-release-offline-installer' }}
runs-on: ubuntu-latest
needs:
- meta
- build-offline-installer
steps:
- name: 'Download Artifact'
uses: actions/download-artifact@v4
with:
name: offline-harperdb-${{ needs.meta.outputs.harperdbVersion }}.tgz
- name: Publish to s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
updateLatest: ${{ needs.meta.outputs.dockerhub_tag_latest }}
dryrun: ${{ needs.meta.outputs.dryrun }}
run: |
#!/bin/bash
set -e
# if dryrun, just echo out the commands
aws_cmd='echo aws'
[ "${dryrun}" == "false" ] && aws_cmd='aws'
${aws_cmd} s3 cp ./harperdb-${{ needs.meta.outputs.harperdbVersion }}.tgz s3://products-harperdb-io
if [[ ${updateLatest} == "true" ]]
then
${aws_cmd} s3 rm --recursive s3://products-harperdb-io/latest
${aws_cmd} s3 cp ./harperdb-${{ needs.meta.outputs.harperdbVersion }}.tgz s3://products-harperdb-io/latest/
fi
#################################
# Send Slack Message on success
#################################
sendSlackMessageParty:
uses: ./.github/workflows/post-to-slack-channel.yaml
if: ${{ !cancelled() && !failure() && needs.publicReleaseNPM.result == 'success' && needs.publicReleaseDocker.result == 'success' && needs.publicReleaseOfflineInstaller.result == 'success' && needs.meta.outputs.dryrun == 'false' }}
secrets: inherit
needs:
- meta
- publicReleaseNPM
- publicReleaseDocker
- publicReleaseOfflineInstaller
- sendSlackMessageRealeaseStarted
- sendSlackMessageReadyToDeploy
with:
channel_id: C05PLHLQFQA
update_ts: ${{ needs.meta.outputs.release_type == 'stable' && needs.sendSlackMessageReadyToDeploy.outputs.ts || needs.sendSlackMessageRealeaseStarted.outputs.ts }}
payload: |
{
"text": "${{ github.run_id }} Release ${{ needs.meta.outputs.full_version }} Complete.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "HarperDB Release ${{ needs.meta.outputs.full_version }}"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Status*"
},
{
"type": "mrkdwn",
"text": ":white_check_mark:"
},
{
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run ${{ github.run_id }}>"
},
{
"type": "mrkdwn",
"text": "Completed"
}
]
}
]
}
#################################
# Send Slack Message on failure
#################################
sendSlackMessageFailure:
if: ${{ failure() && !cancelled() && needs.meta.outputs.dryrun == 'false' }}
uses: ./.github/workflows/post-to-slack-channel.yaml
secrets: inherit
needs:
- meta
- build
- npmPrivateRelease
- dockerhubPrivateRelease
- publicReleaseNPM
- publicReleaseDocker
- publicReleaseOfflineInstaller
- sendSlackMessageRealeaseStarted
- sendSlackMessageReadyToDeploy
- sendSlackMessageParty
with:
channel_id: C05PLHLQFQA
update_ts: ${{ needs.sendSlackMessageRealeaseStarted.outputs.ts }}
payload: |
{
"text": "${{ github.run_id }} Release ${{ needs.meta.outputs.full_version }} Failed.",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "HarperDB Release ${{ needs.meta.outputs.full_version }} Failed"
}
},
{
"type": "context",
"elements": [
{
"type": "mrkdwn",
"text": "*Status*"
},
{
"type": "mrkdwn",
"text": "Failed"
},
{
"type": "mrkdwn",
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|run ${{ github.run_id }}>"
},
{
"type": "mrkdwn",
"text": ":x:"
}
]
}
]
}