build.yml 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. ---
  2. # Ci code for building release artifacts.
  3. name: Build
  4. on:
  5. push: # Master branch checks only validate the build and generate artifacts for testing.
  6. branches:
  7. - master
  8. pull_request: null # PR checks only validate the build and generate artifacts for testing.
  9. workflow_dispatch: # Dispatch runs build and validate, then push to the appropriate storage location.
  10. inputs:
  11. type:
  12. description: Build Type
  13. default: nightly
  14. required: true
  15. version:
  16. description: Version Tag
  17. default: nightly
  18. required: true
  19. concurrency: # This keeps multiple instances of the job from running concurrently for the same ref and event type.
  20. group: build-${{ github.ref }}-${{ github.event_name }}
  21. cancel-in-progress: true
  22. jobs:
  23. file-check: # Check what files changed if we’re being run in a PR or on a push.
  24. name: Check Modified Files
  25. runs-on: ubuntu-latest
  26. outputs:
  27. run: ${{ steps.check-run.outputs.run }}
  28. skip-go: ${{ steps.check-go.outputs.skip-go }}
  29. steps:
  30. - name: Checkout
  31. id: checkout
  32. uses: actions/checkout@v4
  33. with:
  34. fetch-depth: 0
  35. submodules: recursive
  36. - name: Check source files
  37. id: check-source-files
  38. uses: tj-actions/changed-files@v44
  39. with:
  40. since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
  41. files: |
  42. **/*.c
  43. **/*.cc
  44. **/*.h
  45. **/*.hh
  46. **/*.in
  47. **/*.patch
  48. src/aclk/aclk-schemas/
  49. src/ml/dlib/
  50. src/fluent-bit/
  51. src/web/server/h2o/libh2o/
  52. files_ignore: |
  53. netdata.spec.in
  54. **/*.md
  55. - name: Check build files
  56. id: check-build-files
  57. uses: tj-actions/changed-files@v44
  58. with:
  59. since_last_remote_commit: ${{ github.event_name != 'pull_request' }}
  60. files: |
  61. **/*.cmake
  62. CMakeLists.txt
  63. netdata-installer.sh
  64. .github/data/distros.yml
  65. .github/workflows/build.yml
  66. .github/scripts/build-static.sh
  67. .github/scripts/get-static-cache-key.sh
  68. .github/scripts/gen-matrix-build.py
  69. .github/scripts/run-updater-check.sh
  70. packaging/cmake/
  71. packaging/makeself/
  72. packaging/installer/
  73. packaging/*.sh
  74. packaging/*.version
  75. packaging/*.checksums
  76. files_ignore: |
  77. **/*.md
  78. - name: List all changed files in pattern
  79. continue-on-error: true
  80. env:
  81. CHANGED_SOURCE_FILES: ${{ steps.check-source-files.outputs.all_changed_files }}
  82. CHANGED_BUILD_FILES: ${{ steps.check-build-files.outputs.all_changed_files }}
  83. run: |
  84. for file in ${CHANGED_SOURCE_FILES} ${CHANGED_BUILD_FILES} ; do
  85. echo "$file was changed"
  86. done
  87. - name: Check Run
  88. id: check-run
  89. run: |
  90. if [ "${{ steps.check-source-files.outputs.any_modified }}" == "true" ] || [ "${{ steps.check-build-files.outputs.any_modified }}" == "true" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
  91. echo 'run=true' >> "${GITHUB_OUTPUT}"
  92. else
  93. echo 'run=false' >> "${GITHUB_OUTPUT}"
  94. fi
  95. - name: Check Go
  96. id: check-go
  97. env:
  98. OTHER_CHANGED_FILES: ${{ steps.check-source-files.outputs.other_changed_files }}
  99. run: |
  100. if [ '${{ github.event_name }}' == 'pull_request' ]; then
  101. if echo "${OTHER_CHANGED_FILES}" | grep -q '.*/(.*\.go|go\.mod|go\.sum)$' || [ "${{ steps.check-build-files.outputs.any_modified }}" == "true" ]; then
  102. echo 'skip-go=' >> "${GITHUB_OUTPUT}"
  103. else
  104. echo 'skip-go=--disable-go' >> "${GITHUB_OUTPUT}"
  105. fi
  106. else
  107. echo 'skip-go=' >> "${GITHUB_OUTPUT}"
  108. fi
  109. build-dist: # Build the distribution tarball and store it as an artifact.
  110. name: Build Distribution Tarball
  111. runs-on: ubuntu-latest
  112. needs:
  113. - file-check
  114. outputs:
  115. distfile: ${{ steps.build.outputs.distfile }}
  116. steps:
  117. - name: Skip Check
  118. id: skip
  119. if: needs.file-check.outputs.run != 'true'
  120. run: echo "SKIPPED"
  121. - name: Checkout
  122. id: checkout
  123. if: needs.file-check.outputs.run == 'true'
  124. uses: actions/checkout@v4
  125. with:
  126. fetch-depth: 0
  127. submodules: recursive
  128. - name: Fix tags
  129. id: fix-tags
  130. if: github.event_name != 'push' && needs.file-check.outputs.run == 'true'
  131. run: |
  132. git fetch --tags --force
  133. - name: Mark Stable
  134. id: channel
  135. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly' && needs.file-check.outputs.run == 'true'
  136. run: |
  137. sed -i 's/^RELEASE_CHANNEL="nightly"/RELEASE_CHANNEL="stable"/' netdata-installer.sh
  138. - name: Build
  139. id: build
  140. if: needs.file-check.outputs.run == 'true'
  141. run: |
  142. mkdir -p artifacts/
  143. tar --create --file "artifacts/netdata-$(git describe).tar.gz" \
  144. --sort=name --posix --auto-compress --exclude=artifacts/ --exclude=.git \
  145. --exclude=.gitignore --exclude=.gitattributes --exclude=.gitmodules \
  146. --transform "s/^\\.\\//netdata-$(git describe)\\//" --verbose .
  147. cd artifacts/
  148. echo "distfile=$(find . -name 'netdata-*.tar.gz')" >> "${GITHUB_OUTPUT}"
  149. - name: Store
  150. id: store
  151. if: needs.file-check.outputs.run == 'true'
  152. uses: actions/upload-artifact@v4
  153. with:
  154. name: dist-tarball
  155. path: artifacts/*.tar.gz
  156. retention-days: 30
  157. - name: Failure Notification
  158. uses: rtCamp/action-slack-notify@v2
  159. env:
  160. SLACK_COLOR: 'danger'
  161. SLACK_FOOTER: ''
  162. SLACK_ICON_EMOJI: ':github-actions:'
  163. SLACK_TITLE: 'Distribution tarball creation failed:'
  164. SLACK_USERNAME: 'GitHub Actions'
  165. SLACK_MESSAGE: |-
  166. ${{ github.repository }}: Failed to create source tarball for distribution.
  167. Checkout: ${{ steps.checkout.outcome }}
  168. Fix Tags: ${{ steps.fix-tags.outcome }}
  169. Mark stable: ${{ steps.channel.outcome }}
  170. Build: ${{ steps.build.outcome }}
  171. Store: ${{ steps.store.outcome }}
  172. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  173. if: >-
  174. ${{
  175. failure()
  176. && startsWith(github.ref, 'refs/heads/master')
  177. && github.event_name != 'pull_request'
  178. && github.repository == 'netdata/netdata'
  179. && needs.file-check.outputs.run == 'true'
  180. }}
  181. build-static: # Build the static binary archives, and store them as artifacts.
  182. name: Build Static
  183. runs-on: ubuntu-latest
  184. needs:
  185. - file-check
  186. strategy:
  187. matrix:
  188. arch:
  189. - x86_64
  190. - armv6l
  191. - armv7l
  192. - aarch64
  193. - ppc64le
  194. steps:
  195. - name: Skip Check
  196. id: skip
  197. if: needs.file-check.outputs.run != 'true'
  198. run: echo "SKIPPED"
  199. - name: Checkout
  200. id: checkout
  201. if: needs.file-check.outputs.run == 'true'
  202. uses: actions/checkout@v4
  203. with:
  204. fetch-depth: 0
  205. submodules: recursive
  206. - name: Fix tags
  207. id: fix-tags
  208. if: github.event_name != 'push' && needs.file-check.outputs.run == 'true'
  209. run: |
  210. git fetch --tags --force
  211. - name: Mark Stable
  212. id: channel
  213. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly' && needs.file-check.outputs.run == 'true'
  214. run: |
  215. sed -i 's/^RELEASE_CHANNEL="nightly"/RELEASE_CHANNEL="stable"/' netdata-installer.sh packaging/makeself/install-or-update.sh
  216. - name: Get Cache Key
  217. if: (github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache')) && needs.file-check.outputs.run == 'true'
  218. id: cache-key
  219. run: .github/scripts/get-static-cache-key.sh ${{ matrix.arch }} "${{ contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache') }}"
  220. - name: Cache
  221. if: (github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache')) && needs.file-check.outputs.run == 'true'
  222. id: cache
  223. uses: actions/cache@v4
  224. with:
  225. path: artifacts/cache
  226. key: ${{ steps.cache-key.outputs.key }}
  227. - name: Build
  228. if: github.event_name != 'workflow_dispatch' && needs.file-check.outputs.run == 'true' # Don’t use retries on PRs.
  229. run: |
  230. export EXTRA_INSTALL_FLAGS=${{ needs.file-check.outputs.skip-go }}
  231. .github/scripts/build-static.sh ${{ matrix.arch }}
  232. - name: Build
  233. if: github.event_name == 'workflow_dispatch' && needs.file-check.outputs.run == 'true'
  234. id: build
  235. uses: nick-fields/retry@v3
  236. with:
  237. timeout_minutes: 180
  238. max_attempts: 3
  239. command: |
  240. export EXTRA_INSTALL_FLAGS=${{ needs.file-check.outputs.skip-go }}
  241. .github/scripts/build-static.sh ${{ matrix.arch }}
  242. - name: Store
  243. id: store
  244. if: needs.file-check.outputs.run == 'true'
  245. uses: actions/upload-artifact@v4
  246. with:
  247. name: dist-static-${{ matrix.arch }}
  248. path: artifacts/*.gz.run
  249. retention-days: 30
  250. - name: Failure Notification
  251. uses: rtCamp/action-slack-notify@v2
  252. env:
  253. SLACK_COLOR: 'danger'
  254. SLACK_FOOTER: ''
  255. SLACK_ICON_EMOJI: ':github-actions:'
  256. SLACK_TITLE: 'Static build failed:'
  257. SLACK_USERNAME: 'GitHub Actions'
  258. SLACK_MESSAGE: |-
  259. ${{ github.repository }}: Failed to create static installer archive for ${{ matrix.arch }}.
  260. Checkout: ${{ steps.checkout.outcome }}
  261. Fix Tags: ${{ steps.fix-tags.outcome }}
  262. Mark stable: ${{ steps.channel.outcome }}
  263. Build: ${{ steps.build.outcome }}
  264. Store: ${{ steps.store.outcome }}
  265. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  266. if: >-
  267. ${{
  268. failure()
  269. && startsWith(github.ref, 'refs/heads/master')
  270. && github.event_name != 'pull_request'
  271. && github.repository == 'netdata/netdata'
  272. && needs.file-check.outputs.run == 'true'
  273. }}
  274. matrix: # Generate the shared build matrix for our build tests.
  275. name: Prepare Build Matrix
  276. runs-on: ubuntu-latest
  277. if: github.event_name != 'workflow_dispatch'
  278. outputs:
  279. matrix: ${{ steps.set-matrix.outputs.matrix }}
  280. steps:
  281. - name: Checkout
  282. id: checkout
  283. uses: actions/checkout@v4
  284. - name: Prepare tools
  285. id: prepare
  286. run: |
  287. sudo apt-get update && sudo apt-get install -y python3-ruamel.yaml
  288. - name: Read build matrix
  289. id: set-matrix
  290. run: |
  291. matrix="$(.github/scripts/gen-matrix-build.py)"
  292. echo "Generated matrix: ${matrix}"
  293. echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
  294. - name: Failure Notification
  295. uses: rtCamp/action-slack-notify@v2
  296. env:
  297. SLACK_COLOR: 'danger'
  298. SLACK_FOOTER: ''
  299. SLACK_ICON_EMOJI: ':github-actions:'
  300. SLACK_TITLE: 'Build matrix preparation failed:'
  301. SLACK_USERNAME: 'GitHub Actions'
  302. SLACK_MESSAGE: |-
  303. ${{ github.repository }}: Failed to prepare build matrix for build checks.
  304. Checkout: ${{ steps.checkout.outcome }}
  305. Prepare tools: ${{ steps.prepare.outcome }}
  306. Read build matrix: ${{ steps.set-matrix.outcome }}
  307. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  308. if: >-
  309. ${{
  310. failure()
  311. && startsWith(github.ref, 'refs/heads/master')
  312. && github.event_name != 'pull_request'
  313. && github.repository == 'netdata/netdata'
  314. }}
  315. prepare-test-images: # Prepare the test environments for our build checks. This also checks dependency handling code for each tested environment.
  316. name: Prepare Test Environments
  317. runs-on: ubuntu-latest
  318. if: github.event_name != 'workflow_dispatch'
  319. needs:
  320. - matrix
  321. env:
  322. RETRY_DELAY: 300
  323. strategy:
  324. # Unlike the actual build tests, this completes _very_ fast (average of about 3 minutes for each job), so we
  325. # just run everything in parallel instead lof limiting job concurrency.
  326. fail-fast: false
  327. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  328. steps:
  329. - name: Checkout
  330. id: checkout
  331. uses: actions/checkout@v4
  332. - name: Setup Buildx
  333. id: buildx
  334. uses: docker/setup-buildx-action@v3
  335. - name: Build test environment
  336. id: build1
  337. uses: docker/build-push-action@v5
  338. continue-on-error: true # We retry 3 times at 5 minute intervals if there is a failure here.
  339. with:
  340. push: false
  341. load: false
  342. file: .github/dockerfiles/Dockerfile.build_test
  343. build-args: |
  344. BASE=${{ matrix.distro }}
  345. PRE=${{ matrix.env_prep }}
  346. RMJSONC=${{ matrix.jsonc_removal }}
  347. outputs: type=docker,dest=/tmp/image.tar
  348. tags: test:${{ matrix.artifact_key }}
  349. - name: Retry delay
  350. if: ${{ steps.build1.outcome == 'failure' }}
  351. run: sleep "${RETRY_DELAY}"
  352. - name: Build test environment (attempt 2)
  353. if: ${{ steps.build1.outcome == 'failure' }}
  354. id: build2
  355. uses: docker/build-push-action@v5
  356. continue-on-error: true # We retry 3 times at 5 minute intervals if there is a failure here.
  357. with:
  358. push: false
  359. load: false
  360. file: .github/dockerfiles/Dockerfile.build_test
  361. build-args: |
  362. BASE=${{ matrix.distro }}
  363. PRE=${{ matrix.env_prep }}
  364. RMJSONC=${{ matrix.jsonc_removal }}
  365. outputs: type=docker,dest=/tmp/image.tar
  366. tags: test:${{ matrix.artifact_key }}
  367. - name: Retry delay
  368. if: ${{ steps.build1.outcome == 'failure' && steps.build2.outcome == 'failure' }}
  369. run: sleep "${RETRY_DELAY}"
  370. - name: Build test environment (attempt 3)
  371. if: ${{ steps.build1.outcome == 'failure' && steps.build2.outcome == 'failure' }}
  372. id: build3
  373. uses: docker/build-push-action@v5
  374. with:
  375. push: false
  376. load: false
  377. file: .github/dockerfiles/Dockerfile.build_test
  378. build-args: |
  379. BASE=${{ matrix.distro }}
  380. PRE=${{ matrix.env_prep }}
  381. RMJSONC=${{ matrix.jsonc_removal }}
  382. outputs: type=docker,dest=/tmp/image.tar
  383. tags: test:${{ matrix.artifact_key }}
  384. - name: Upload image artifact
  385. id: upload
  386. uses: actions/upload-artifact@v4
  387. with:
  388. name: ${{ matrix.artifact_key }}-test-env
  389. path: /tmp/image.tar
  390. retention-days: 30
  391. - name: Failure Notification
  392. uses: rtCamp/action-slack-notify@v2
  393. env:
  394. SLACK_COLOR: 'danger'
  395. SLACK_FOOTER: ''
  396. SLACK_ICON_EMOJI: ':github-actions:'
  397. SLACK_TITLE: 'Test environment preparation for ${{ matrix.distro }} failed:'
  398. SLACK_USERNAME: 'GitHub Actions'
  399. SLACK_MESSAGE: |-
  400. ${{ github.repository }}: Test environment preparation for ${{ matrix.distro }} failed.
  401. Checkout: ${{ steps.checkout.outcome }}
  402. Set up Buildx: ${{ steps.buildx.outcome }}
  403. Build test environment: ${{ steps.build1.outcome }}
  404. Build test environment (attempt 2): ${{ steps.build2.outcome }}
  405. Build test environment (attempt 3): ${{ steps.build3.outcome }}
  406. Upload: ${{ steps.upload.outcome }}
  407. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  408. if: >-
  409. ${{
  410. failure()
  411. && startsWith(github.ref, 'refs/heads/master')
  412. && github.event_name != 'pull_request'
  413. && github.repository == 'netdata/netdata'
  414. }}
  415. source-build: # Test various source build arrangements.
  416. name: Test Source Build
  417. runs-on: ubuntu-latest
  418. if: github.event_name != 'workflow_dispatch'
  419. needs:
  420. - matrix
  421. - prepare-test-images
  422. - file-check
  423. strategy:
  424. fail-fast: false
  425. max-parallel: 8
  426. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  427. steps:
  428. - name: Skip Check
  429. id: skip
  430. if: needs.file-check.outputs.run != 'true'
  431. run: echo "SKIPPED"
  432. - name: Checkout
  433. id: checkout
  434. if: needs.file-check.outputs.run == 'true'
  435. uses: actions/checkout@v4
  436. with:
  437. submodules: recursive
  438. - name: Fetch test environment
  439. id: fetch
  440. if: needs.file-check.outputs.run == 'true'
  441. uses: Wandalen/wretry.action@v3
  442. with:
  443. action: actions/download-artifact@v4
  444. with: |
  445. name: ${{ matrix.artifact_key }}-test-env
  446. path: .
  447. attempt_limit: 3
  448. attempt_delay: 2000
  449. - name: Load test environment
  450. id: load
  451. if: needs.file-check.outputs.run == 'true'
  452. run: docker load --input image.tar
  453. - name: netdata-installer on ${{ matrix.distro }}, disable cloud
  454. id: build-no-cloud
  455. if: needs.file-check.outputs.run == 'true'
  456. run: |
  457. docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
  458. /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}'
  459. - name: netdata-installer on ${{ matrix.distro }}, require cloud
  460. id: build-cloud
  461. if: needs.file-check.outputs.run == 'true'
  462. run: |
  463. docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
  464. /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}'
  465. - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C
  466. id: build-no-jsonc
  467. if: matrix.jsonc_removal != '' && needs.file-check.outputs.run == 'true'
  468. run: |
  469. docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
  470. /bin/sh -c '/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}'
  471. - name: Failure Notification
  472. uses: rtCamp/action-slack-notify@v2
  473. env:
  474. SLACK_COLOR: 'danger'
  475. SLACK_FOOTER: ''
  476. SLACK_ICON_EMOJI: ':github-actions:'
  477. SLACK_TITLE: 'Build tests for ${{ matrix.distro }} failed:'
  478. SLACK_USERNAME: 'GitHub Actions'
  479. SLACK_MESSAGE: |-
  480. ${{ github.repository }}: Build tests for ${{ matrix.distro }} failed.
  481. Checkout: ${{ steps.checkout.outcome }}
  482. Fetch test environment: ${{ steps.fetch.outcome }}
  483. Load test environment: ${{ steps.load.outcome }}
  484. netdata-installer, disable cloud: ${{ steps.build-no-cloud.outcome }}
  485. netdata-installer, require cloud: ${{ steps.build-cloud.outcome }}
  486. netdata-installer, no JSON-C: ${{ steps.build-no-jsonc.outcome }}
  487. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  488. if: >-
  489. ${{
  490. failure()
  491. && startsWith(github.ref, 'refs/heads/master')
  492. && github.event_name != 'pull_request'
  493. && github.repository == 'netdata/netdata'
  494. && needs.file-check.outputs.run == 'true'
  495. }}
  496. updater-check: # Test the generated dist archive using the updater code.
  497. name: Test Generated Distfile and Updater Code
  498. runs-on: ubuntu-latest
  499. if: github.event_name != 'workflow_dispatch'
  500. needs:
  501. - build-dist
  502. - matrix
  503. - prepare-test-images
  504. - file-check
  505. strategy:
  506. fail-fast: false
  507. max-parallel: 8
  508. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  509. services:
  510. apache: # This gets used to serve the dist tarball for the updater script.
  511. image: httpd:2.4
  512. ports:
  513. - 8080:80
  514. volumes:
  515. - ${{ github.workspace }}:/usr/local/apache2/htdocs/
  516. steps:
  517. - name: Skip Check
  518. id: skip
  519. if: needs.file-check.outputs.run != 'true'
  520. run: echo "SKIPPED"
  521. - name: Checkout
  522. id: checkout
  523. if: needs.file-check.outputs.run == 'true'
  524. uses: actions/checkout@v4
  525. - name: Fetch dist tarball artifacts
  526. id: fetch-tarball
  527. if: needs.file-check.outputs.run == 'true'
  528. uses: Wandalen/wretry.action@v3
  529. with:
  530. action: actions/download-artifact@v4
  531. with: |
  532. name: dist-tarball
  533. path: dist-tarball
  534. attempt_limit: 3
  535. attempt_delay: 2000
  536. - name: Prepare artifact directory
  537. id: prepare
  538. if: needs.file-check.outputs.run == 'true'
  539. run: |
  540. mkdir -p artifacts/download/v9999.0.0 || exit 1
  541. mkdir -p artifacts/latest || exit 1
  542. echo "v9999.0.0" > artifacts/latest/latest-version.txt || exit 1
  543. cp dist-tarball/* artifacts/download/v9999.0.0 || exit 1
  544. cd artifacts/download/v9999.0.0 || exit 1
  545. ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
  546. ls -lFh
  547. sha256sum -b ./* > "sha256sums.txt" || exit 1
  548. cat sha256sums.txt
  549. cd ../.. || exit 1
  550. ls -lR
  551. - name: Fetch test environment
  552. id: fetch-test-environment
  553. if: needs.file-check.outputs.run == 'true'
  554. uses: Wandalen/wretry.action@v3
  555. with:
  556. action: actions/download-artifact@v4
  557. with: |
  558. name: ${{ matrix.artifact_key }}-test-env
  559. path: .
  560. attempt_limit: 3
  561. attempt_delay: 2000
  562. - name: Load test environment
  563. id: load
  564. if: needs.file-check.outputs.run == 'true'
  565. run: docker load --input image.tar
  566. - name: Install netdata and run the updater on ${{ matrix.distro }}
  567. id: updater-check
  568. if: needs.file-check.outputs.run == 'true'
  569. run: |
  570. docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --network host -w /netdata \
  571. -e EXTRA_INSTALL_FLAGS=${{ needs.file-check.outputs.skip-go }} \
  572. test:${{ matrix.artifact_key }} /netdata/.github/scripts/run-updater-check.sh
  573. - name: Failure Notification
  574. uses: rtCamp/action-slack-notify@v2
  575. env:
  576. SLACK_COLOR: 'danger'
  577. SLACK_FOOTER: ''
  578. SLACK_ICON_EMOJI: ':github-actions:'
  579. SLACK_TITLE: 'Updater checks for ${{ matrix.distro }} failed:'
  580. SLACK_USERNAME: 'GitHub Actions'
  581. SLACK_MESSAGE: |-
  582. ${{ github.repository }}: Updater checks for ${{ matrix.distro }} failed.
  583. Checkout: ${{ steps.checkout.outcome }}
  584. Fetch dist tarball: ${{ steps.fetch-tarball.outcome }}
  585. Prepare artifact directory: ${{ steps.prepare.outcome }}
  586. Fetch test environment: ${{ steps.fetch-test-environment.outcome }}
  587. Load test environment: ${{ steps.load.outcome }}
  588. Updater check: ${{ steps.updater-check.outcome }}
  589. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  590. if: >-
  591. ${{
  592. failure()
  593. && startsWith(github.ref, 'refs/heads/master')
  594. && github.event_name != 'pull_request'
  595. && github.repository == 'netdata/netdata'
  596. && needs.file-check.outputs.run == 'true'
  597. }}
  598. prepare-upload: # Consolidate the artifacts for uploading or releasing.
  599. name: Prepare Artifacts
  600. runs-on: ubuntu-latest
  601. needs:
  602. - build-dist
  603. - build-static
  604. - file-check
  605. steps:
  606. - name: Skip Check
  607. id: skip
  608. if: needs.file-check.outputs.run != 'true'
  609. run: echo "SKIPPED"
  610. - name: Checkout
  611. id: checkout
  612. if: needs.file-check.outputs.run == 'true'
  613. uses: actions/checkout@v4
  614. - name: Prepare Environment
  615. id: prepare
  616. if: needs.file-check.outputs.run == 'true'
  617. run: mkdir -p artifacts
  618. - name: Retrieve Build Artifacts
  619. id: fetch-dist
  620. if: needs.file-check.outputs.run == 'true'
  621. uses: Wandalen/wretry.action@v3
  622. with:
  623. action: actions/download-artifact@v4
  624. with: |
  625. pattern: dist-*
  626. path: dist-artifacts
  627. merge-multiple: true
  628. attempt_limit: 3
  629. attempt_delay: 2000
  630. - name: Prepare Artifacts
  631. id: consolidate
  632. if: needs.file-check.outputs.run == 'true'
  633. working-directory: ./artifacts/
  634. run: |
  635. mv ../dist-artifacts/* . || exit 1
  636. ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
  637. cp ../packaging/version ./latest-version.txt || exit 1
  638. cp ../integrations/integrations.js ./integrations.js || exit 1
  639. sha256sum -b ./* > sha256sums.txt || exit 1
  640. cat sha256sums.txt
  641. - name: Store Artifacts
  642. id: store
  643. if: needs.file-check.outputs.run == 'true'
  644. uses: actions/upload-artifact@v4
  645. with:
  646. name: final-artifacts
  647. path: artifacts/*
  648. retention-days: 30
  649. - name: Failure Notification
  650. uses: rtCamp/action-slack-notify@v2
  651. env:
  652. SLACK_COLOR: 'danger'
  653. SLACK_FOOTER: ''
  654. SLACK_ICON_EMOJI: ':github-actions:'
  655. SLACK_TITLE: 'Failed to prepare release artifacts for upload:'
  656. SLACK_USERNAME: 'GitHub Actions'
  657. SLACK_MESSAGE: |-
  658. ${{ github.repository }}: Failed to prepare release artifacts for upload.
  659. Checkout: ${{ steps.checkout.outcome }}
  660. Prepare environment: ${{ steps.prepare.outcome }}
  661. Fetch dist tarball: ${{ steps.fetch-dist.outcome }}
  662. Consolidate artifacts: ${{ steps.consolidate.outcome }}
  663. Store: ${{ steps.store.outcome }}
  664. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  665. if: >-
  666. ${{
  667. failure()
  668. && startsWith(github.ref, 'refs/heads/master')
  669. && github.event_name != 'pull_request'
  670. && github.repository == 'netdata/netdata'
  671. && needs.file-check.outputs.run == 'true'
  672. }}
  673. artifact-verification-dist: # Verify the regular installer works with the consolidated artifacts.
  674. name: Test Consolidated Artifacts (Source)
  675. runs-on: ubuntu-latest
  676. needs:
  677. - prepare-upload
  678. - file-check
  679. services:
  680. apache: # This gets used to serve the dist tarball for the updater script.
  681. image: httpd:2.4
  682. ports:
  683. - 8080:80
  684. volumes:
  685. - ${{ github.workspace }}:/usr/local/apache2/htdocs/
  686. steps:
  687. - name: Skip Check
  688. id: skip
  689. if: needs.file-check.outputs.run != 'true'
  690. run: echo "SKIPPED"
  691. - name: Checkout
  692. id: checkout
  693. if: needs.file-check.outputs.run == 'true'
  694. uses: actions/checkout@v4
  695. - name: Fetch artifacts
  696. id: fetch
  697. if: needs.file-check.outputs.run == 'true'
  698. uses: Wandalen/wretry.action@v3
  699. with:
  700. action: actions/download-artifact@v4
  701. with: |
  702. name: final-artifacts
  703. path: artifacts
  704. attempt_limit: 3
  705. attempt_delay: 2000
  706. - name: Prepare artifacts directory
  707. id: prepare
  708. if: needs.file-check.outputs.run == 'true'
  709. run: |
  710. mkdir -p download/latest
  711. mv artifacts/* download/latest
  712. ls -al download/latest
  713. - name: Verify that artifacts work with installer
  714. id: verify
  715. if: needs.file-check.outputs.run == 'true'
  716. env:
  717. NETDATA_TARBALL_BASEURL: http://localhost:8080/
  718. run: packaging/installer/kickstart.sh --build-only --dont-start-it --disable-telemetry --dont-wait
  719. - name: Failure Notification
  720. uses: rtCamp/action-slack-notify@v2
  721. env:
  722. SLACK_COLOR: 'danger'
  723. SLACK_FOOTER: ''
  724. SLACK_ICON_EMOJI: ':github-actions:'
  725. SLACK_TITLE: 'Artifact verification for source tarball failed.'
  726. SLACK_USERNAME: 'GitHub Actions'
  727. SLACK_MESSAGE: |-
  728. ${{ github.repository }}: Artifact verification for source tarball failed.
  729. Checkout: ${{ steps.checkout.outcome }}
  730. Fetch artifacts: ${{ steps.fetch.outcome }}
  731. Verify artifacts: ${{ steps.verify.outcome }}
  732. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  733. if: >-
  734. ${{
  735. failure()
  736. && startsWith(github.ref, 'refs/heads/master')
  737. && github.event_name != 'pull_request'
  738. && github.repository == 'netdata/netdata'
  739. && needs.file-check.outputs.run == 'true'
  740. }}
  741. artifact-verification-static: # Verify the static installer works with the consolidated artifacts.
  742. name: Test Consolidated Artifacts (Static)
  743. runs-on: ubuntu-latest
  744. needs:
  745. - prepare-upload
  746. - file-check
  747. services:
  748. apache: # This gets used to serve the static archives.
  749. image: httpd:2.4
  750. ports:
  751. - 8080:80
  752. volumes:
  753. - ${{ github.workspace }}:/usr/local/apache2/htdocs/
  754. steps:
  755. - name: Skip Check
  756. id: skip
  757. if: needs.file-check.outputs.run != 'true'
  758. run: echo "SKIPPED"
  759. - name: Checkout
  760. id: checkout
  761. if: needs.file-check.outputs.run == 'true'
  762. uses: actions/checkout@v4
  763. - name: Fetch artifacts
  764. id: fetch-artifacts
  765. if: needs.file-check.outputs.run == 'true'
  766. uses: Wandalen/wretry.action@v3
  767. with:
  768. action: actions/download-artifact@v4
  769. with: |
  770. name: final-artifacts
  771. path: artifacts
  772. attempt_limit: 3
  773. attempt_delay: 2000
  774. - name: Prepare artifacts directory
  775. id: prepare
  776. if: needs.file-check.outputs.run == 'true'
  777. run: |
  778. mkdir -p download/latest
  779. mv artifacts/* download/latest
  780. ls -al download/latest
  781. - name: Verify that artifacts work with installer
  782. id: verify
  783. if: needs.file-check.outputs.run == 'true'
  784. env:
  785. NETDATA_TARBALL_BASEURL: http://localhost:8080/
  786. run: packaging/installer/kickstart.sh --static-only --dont-start-it --disable-telemetry
  787. - name: Failure Notification
  788. uses: rtCamp/action-slack-notify@v2
  789. env:
  790. SLACK_COLOR: 'danger'
  791. SLACK_FOOTER: ''
  792. SLACK_ICON_EMOJI: ':github-actions:'
  793. SLACK_TITLE: 'Artifact verification for static build failed.'
  794. SLACK_USERNAME: 'GitHub Actions'
  795. SLACK_MESSAGE: |-
  796. ${{ github.repository }}: Artifact verification for static build failed.
  797. Checkout: ${{ steps.checkout.outcome }}
  798. Fetch artifacts: ${{ steps.fetch-artifacts.outcome }}
  799. Verify artifacts: ${{ steps.verify.outcome }}
  800. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  801. if: >-
  802. ${{
  803. failure()
  804. && startsWith(github.ref, 'refs/heads/master')
  805. && github.event_name != 'pull_request'
  806. && github.repository == 'netdata/netdata'
  807. && needs.file-check.outputs.run == 'true'
  808. }}
  809. upload-nightly: # Upload the nightly build artifacts to GCS.
  810. name: Upload Nightly Artifacts
  811. runs-on: ubuntu-latest
  812. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata'
  813. needs:
  814. - artifact-verification-dist
  815. - artifact-verification-static
  816. steps:
  817. - name: Retrieve Artifacts
  818. id: fetch
  819. uses: Wandalen/wretry.action@v3
  820. with:
  821. action: actions/download-artifact@v4
  822. with: |
  823. name: final-artifacts
  824. path: final-artifacts
  825. attempt_limit: 3
  826. attempt_delay: 2000
  827. - name: Authenticate to GCS
  828. id: gcs-auth
  829. uses: google-github-actions/auth@v2
  830. with:
  831. project_id: ${{ secrets.GCP_NIGHTLY_STORAGE_PROJECT }}
  832. credentials_json: ${{ secrets.GCS_STORAGE_SERVICE_KEY_JSON }}
  833. - name: Setup GCS
  834. id: gcs-setup
  835. uses: google-github-actions/setup-gcloud@v2.0.1
  836. - name: Upload Artifacts
  837. id: upload
  838. uses: google-github-actions/upload-cloud-storage@v2.0.0
  839. with:
  840. destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }}
  841. gzip: false
  842. path: ./final-artifacts/latest-version.txt
  843. parent: false
  844. - name: Failure Notification
  845. uses: rtCamp/action-slack-notify@v2
  846. env:
  847. SLACK_COLOR: 'danger'
  848. SLACK_FOOTER: ''
  849. SLACK_ICON_EMOJI: ':github-actions:'
  850. SLACK_TITLE: 'Failed to upload nightly release artifacts:'
  851. SLACK_USERNAME: 'GitHub Actions'
  852. SLACK_MESSAGE: |-
  853. ${{ github.repository }}: Failed to upload nightly release artifacts.
  854. Fetch artifacts: ${{ steps.fetch.outcome }}
  855. Authenticatie GCS: ${{ steps.gcs-auth.outcome }}
  856. Setup GCS: ${{ steps.gcs-setup.outcome }}
  857. Upload artifacts: ${{ steps.upload.outcome }}
  858. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  859. if: >-
  860. ${{
  861. failure()
  862. && startsWith(github.ref, 'refs/heads/master')
  863. && github.event_name != 'pull_request'
  864. }}
  865. create-nightly: # Create a nightly build release in netdata/netdata-nightlies
  866. name: Create Nightly Release
  867. runs-on: ubuntu-latest
  868. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata'
  869. needs:
  870. - artifact-verification-dist
  871. - artifact-verification-static
  872. steps:
  873. - name: Checkout Main Repo
  874. id: checkout-main
  875. uses: actions/checkout@v4
  876. with:
  877. path: main
  878. - name: Checkout Nightly Repo
  879. id: checkout-nightly
  880. uses: actions/checkout@v4
  881. with:
  882. repository: netdata/netdata-nightlies
  883. path: nightlies
  884. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  885. - name: Retrieve Artifacts
  886. id: fetch
  887. uses: Wandalen/wretry.action@v3
  888. with:
  889. action: actions/download-artifact@v4
  890. with: |
  891. name: final-artifacts
  892. path: final-artifacts
  893. attempt_limit: 3
  894. attempt_delay: 2000
  895. - name: Prepare version info
  896. id: version
  897. run: |
  898. # shellcheck disable=SC2129
  899. echo "version=$(cat main/packaging/version)" >> "${GITHUB_OUTPUT}"
  900. echo "commit=$(cd nightlies && git rev-parse HEAD)" >> "${GITHUB_OUTPUT}"
  901. echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}"
  902. - name: Create Release
  903. id: create-release
  904. uses: ncipollo/release-action@v1
  905. with:
  906. allowUpdates: false
  907. artifactErrorsFailBuild: true
  908. artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js'
  909. owner: netdata
  910. repo: netdata-nightlies
  911. body: Netdata nightly build for ${{ steps.version.outputs.date }}.
  912. commit: ${{ steps.version.outputs.commit }}
  913. makeLatest: true
  914. tag: ${{ steps.version.outputs.version }}
  915. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  916. - name: Checkout netdata main Repo # Checkout back to netdata/netdata repo to the update latest packaged versions
  917. id: checkout-netdata
  918. uses: actions/checkout@v4
  919. with:
  920. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  921. - name: Init python environment for publish release metadata
  922. uses: actions/setup-python@v5
  923. id: init-python
  924. with:
  925. python-version: "3.12"
  926. - name: Setup python environment
  927. id: setup-python
  928. run: |
  929. pip install -r .github/scripts/modules/requirements.txt
  930. - name: Check if the version is latest and published
  931. id: check-latest-version
  932. run: |
  933. python .github/scripts/check_latest_versions.py ${{ steps.version.outputs.version }}
  934. - name: SSH setup
  935. id: ssh-setup
  936. if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-latest-version.outputs.versions_needs_update == 'true'
  937. uses: shimataro/ssh-key-action@v2
  938. with:
  939. key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }}
  940. name: id_ecdsa
  941. known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }}
  942. - name: Sync newer releases
  943. id: sync-releases
  944. if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-latest-version.outputs.versions_needs_update == 'true'
  945. run: |
  946. .github/scripts/upload-new-version-tags.sh
  947. - name: Failure Notification
  948. uses: rtCamp/action-slack-notify@v2
  949. env:
  950. SLACK_COLOR: 'danger'
  951. SLACK_FOOTER: ''
  952. SLACK_ICON_EMOJI: ':github-actions:'
  953. SLACK_TITLE: 'Failed to draft release:'
  954. SLACK_USERNAME: 'GitHub Actions'
  955. SLACK_MESSAGE: |-
  956. ${{ github.repository }}: Failed to create nightly release or attach artifacts.
  957. Checkout netdata/netdata: ${{ steps.checkout-main.outcome }}
  958. Checkout netdata/netdata-nightlies: ${{ steps.checkout-nightly.outcome }}
  959. Fetch artifacts: ${{ steps.fetch.outcome }}
  960. Prepare version info: ${{ steps.version.outcome }}
  961. Create release: ${{ steps.create-release.outcome }}
  962. Checkout back netdata/netdata: ${{ steps.checkout-netdata.outcome }}
  963. Init python environment: ${{ steps.init-python.outcome }}
  964. Setup python environment: ${{ steps.setup-python.outcome }}
  965. Check the nearly published release against the advertised: ${{ steps.check-latest-version.outcome }}
  966. Setup ssh: ${{ steps.ssh-setup.outcome }}
  967. Sync with the releases: ${{ steps.sync-releases.outcome }}
  968. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  969. if: >-
  970. ${{
  971. failure()
  972. && github.event_name == 'workflow_dispatch'
  973. }}
  974. normalize-tag: # Fix the release tag if needed
  975. name: Normalize Release Tag
  976. runs-on: ubuntu-latest
  977. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'release'
  978. outputs:
  979. tag: ${{ steps.tag.outputs.tag }}
  980. steps:
  981. - name: Normalize Tag
  982. id: tag
  983. run: |
  984. if echo ${{ github.event.inputs.version }} | grep -qE '^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$'; then
  985. echo "tag=v${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
  986. else
  987. echo "tag=${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
  988. fi
  989. upload-release: # Create the draft release and upload the build artifacts.
  990. name: Create Release Draft
  991. runs-on: ubuntu-latest
  992. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'release' && github.repository == 'netdata/netdata'
  993. needs:
  994. - artifact-verification-dist
  995. - artifact-verification-static
  996. - normalize-tag
  997. steps:
  998. - name: Checkout
  999. id: checkout
  1000. uses: actions/checkout@v4
  1001. - name: Retrieve Artifacts
  1002. id: fetch
  1003. uses: Wandalen/wretry.action@v3
  1004. with:
  1005. action: actions/download-artifact@v4
  1006. with: |
  1007. name: final-artifacts
  1008. path: final-artifacts
  1009. attempt_limit: 3
  1010. attempt_delay: 2000
  1011. - name: Create Release
  1012. id: create-release
  1013. uses: ncipollo/release-action@v1
  1014. with:
  1015. allowUpdates: false
  1016. artifactErrorsFailBuild: true
  1017. artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js'
  1018. draft: true
  1019. tag: ${{ needs.normalize-tag.outputs.tag }}
  1020. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  1021. - name: Failure Notification
  1022. uses: rtCamp/action-slack-notify@v2
  1023. env:
  1024. SLACK_COLOR: 'danger'
  1025. SLACK_FOOTER: ''
  1026. SLACK_ICON_EMOJI: ':github-actions:'
  1027. SLACK_TITLE: 'Failed to draft release:'
  1028. SLACK_USERNAME: 'GitHub Actions'
  1029. SLACK_MESSAGE: |-
  1030. ${{ github.repository }}: Failed to create draft release or attach artifacts.
  1031. Checkout: ${{ steps.checkout.outcome }}
  1032. Fetch artifacts: ${{ steps.fetch.outcome }}
  1033. Create draft release: ${{ steps.create-release.outcome }}
  1034. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  1035. if: >-
  1036. ${{
  1037. failure()
  1038. && github.event_name == 'workflow_dispatch'
  1039. }}
  1040. - name: Success Notification
  1041. uses: rtCamp/action-slack-notify@v2
  1042. env:
  1043. SLACK_COLOR: 'good'
  1044. SLACK_FOOTER: ''
  1045. SLACK_ICON_EMOJI: ':github-actions:'
  1046. SLACK_TITLE: 'Created agent draft release:'
  1047. SLACK_USERNAME: 'GitHub Actions'
  1048. SLACK_MESSAGE: "${{ github.repository }}: ${{ steps.create-release.outputs.html_url }}"
  1049. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  1050. if: >-
  1051. ${{
  1052. success()
  1053. && github.event_name == 'workflow_dispatch'
  1054. }}