build.yml 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068
  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 || true
  288. sudo apt-get install -y python3-ruamel.yaml
  289. - name: Read build matrix
  290. id: set-matrix
  291. run: |
  292. matrix="$(.github/scripts/gen-matrix-build.py)"
  293. echo "Generated matrix: ${matrix}"
  294. echo "matrix=${matrix}" >> "${GITHUB_OUTPUT}"
  295. - name: Failure Notification
  296. uses: rtCamp/action-slack-notify@v2
  297. env:
  298. SLACK_COLOR: 'danger'
  299. SLACK_FOOTER: ''
  300. SLACK_ICON_EMOJI: ':github-actions:'
  301. SLACK_TITLE: 'Build matrix preparation failed:'
  302. SLACK_USERNAME: 'GitHub Actions'
  303. SLACK_MESSAGE: |-
  304. ${{ github.repository }}: Failed to prepare build matrix for build checks.
  305. Checkout: ${{ steps.checkout.outcome }}
  306. Prepare tools: ${{ steps.prepare.outcome }}
  307. Read build matrix: ${{ steps.set-matrix.outcome }}
  308. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  309. if: >-
  310. ${{
  311. failure()
  312. && startsWith(github.ref, 'refs/heads/master')
  313. && github.event_name != 'pull_request'
  314. && github.repository == 'netdata/netdata'
  315. }}
  316. prepare-test-images: # Prepare the test environments for our build checks. This also checks dependency handling code for each tested environment.
  317. name: Prepare Test Environments
  318. runs-on: ubuntu-latest
  319. if: github.event_name != 'workflow_dispatch'
  320. needs:
  321. - matrix
  322. env:
  323. RETRY_DELAY: 300
  324. strategy:
  325. # Unlike the actual build tests, this completes _very_ fast (average of about 3 minutes for each job), so we
  326. # just run everything in parallel instead lof limiting job concurrency.
  327. fail-fast: false
  328. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  329. steps:
  330. - name: Checkout
  331. id: checkout
  332. uses: actions/checkout@v4
  333. - name: Setup Buildx
  334. id: buildx
  335. uses: docker/setup-buildx-action@v3
  336. - name: Build test environment
  337. id: build1
  338. uses: docker/build-push-action@v5
  339. continue-on-error: true # We retry 3 times at 5 minute intervals if there is a failure here.
  340. with:
  341. push: false
  342. load: false
  343. file: .github/dockerfiles/Dockerfile.build_test
  344. build-args: |
  345. BASE=${{ matrix.distro }}
  346. PRE=${{ matrix.env_prep }}
  347. RMJSONC=${{ matrix.jsonc_removal }}
  348. outputs: type=docker,dest=/tmp/image.tar
  349. tags: test:${{ matrix.artifact_key }}
  350. - name: Retry delay
  351. if: ${{ steps.build1.outcome == 'failure' }}
  352. run: sleep "${RETRY_DELAY}"
  353. - name: Build test environment (attempt 2)
  354. if: ${{ steps.build1.outcome == 'failure' }}
  355. id: build2
  356. uses: docker/build-push-action@v5
  357. continue-on-error: true # We retry 3 times at 5 minute intervals if there is a failure here.
  358. with:
  359. push: false
  360. load: false
  361. file: .github/dockerfiles/Dockerfile.build_test
  362. build-args: |
  363. BASE=${{ matrix.distro }}
  364. PRE=${{ matrix.env_prep }}
  365. RMJSONC=${{ matrix.jsonc_removal }}
  366. outputs: type=docker,dest=/tmp/image.tar
  367. tags: test:${{ matrix.artifact_key }}
  368. - name: Retry delay
  369. if: ${{ steps.build1.outcome == 'failure' && steps.build2.outcome == 'failure' }}
  370. run: sleep "${RETRY_DELAY}"
  371. - name: Build test environment (attempt 3)
  372. if: ${{ steps.build1.outcome == 'failure' && steps.build2.outcome == 'failure' }}
  373. id: build3
  374. uses: docker/build-push-action@v5
  375. with:
  376. push: false
  377. load: false
  378. file: .github/dockerfiles/Dockerfile.build_test
  379. build-args: |
  380. BASE=${{ matrix.distro }}
  381. PRE=${{ matrix.env_prep }}
  382. RMJSONC=${{ matrix.jsonc_removal }}
  383. outputs: type=docker,dest=/tmp/image.tar
  384. tags: test:${{ matrix.artifact_key }}
  385. - name: Upload image artifact
  386. id: upload
  387. uses: actions/upload-artifact@v4
  388. with:
  389. name: ${{ matrix.artifact_key }}-test-env
  390. path: /tmp/image.tar
  391. retention-days: 30
  392. - name: Failure Notification
  393. uses: rtCamp/action-slack-notify@v2
  394. env:
  395. SLACK_COLOR: 'danger'
  396. SLACK_FOOTER: ''
  397. SLACK_ICON_EMOJI: ':github-actions:'
  398. SLACK_TITLE: 'Test environment preparation for ${{ matrix.distro }} failed:'
  399. SLACK_USERNAME: 'GitHub Actions'
  400. SLACK_MESSAGE: |-
  401. ${{ github.repository }}: Test environment preparation for ${{ matrix.distro }} failed.
  402. Checkout: ${{ steps.checkout.outcome }}
  403. Set up Buildx: ${{ steps.buildx.outcome }}
  404. Build test environment: ${{ steps.build1.outcome }}
  405. Build test environment (attempt 2): ${{ steps.build2.outcome }}
  406. Build test environment (attempt 3): ${{ steps.build3.outcome }}
  407. Upload: ${{ steps.upload.outcome }}
  408. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  409. if: >-
  410. ${{
  411. failure()
  412. && startsWith(github.ref, 'refs/heads/master')
  413. && github.event_name != 'pull_request'
  414. && github.repository == 'netdata/netdata'
  415. }}
  416. source-build: # Test various source build arrangements.
  417. name: Test Source Build
  418. runs-on: ubuntu-latest
  419. if: github.event_name != 'workflow_dispatch'
  420. needs:
  421. - matrix
  422. - prepare-test-images
  423. - file-check
  424. strategy:
  425. fail-fast: false
  426. max-parallel: 8
  427. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  428. steps:
  429. - name: Skip Check
  430. id: skip
  431. if: needs.file-check.outputs.run != 'true'
  432. run: echo "SKIPPED"
  433. - name: Checkout
  434. id: checkout
  435. if: needs.file-check.outputs.run == 'true'
  436. uses: actions/checkout@v4
  437. with:
  438. submodules: recursive
  439. - name: Fetch test environment
  440. id: fetch
  441. if: needs.file-check.outputs.run == 'true'
  442. uses: Wandalen/wretry.action@v3
  443. with:
  444. action: actions/download-artifact@v4
  445. with: |
  446. name: ${{ matrix.artifact_key }}-test-env
  447. path: .
  448. attempt_limit: 3
  449. attempt_delay: 2000
  450. - name: Load test environment
  451. id: load
  452. if: needs.file-check.outputs.run == 'true'
  453. run: docker load --input image.tar
  454. - name: netdata-installer on ${{ matrix.distro }}, disable cloud
  455. id: build-no-cloud
  456. if: needs.file-check.outputs.run == 'true'
  457. run: |
  458. docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
  459. /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --disable-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}'
  460. - name: netdata-installer on ${{ matrix.distro }}, require cloud
  461. id: build-cloud
  462. if: needs.file-check.outputs.run == 'true'
  463. run: |
  464. docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
  465. /bin/sh -c './netdata-installer.sh --dont-wait --dont-start-it --require-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}'
  466. - name: netdata-installer on ${{ matrix.distro }}, require cloud, no JSON-C
  467. id: build-no-jsonc
  468. if: matrix.jsonc_removal != '' && needs.file-check.outputs.run == 'true'
  469. run: |
  470. docker run --security-opt seccomp=unconfined -w /netdata test:${{ matrix.artifact_key }} \
  471. /bin/sh -c '/rmjsonc.sh && ./netdata-installer.sh --dont-wait --dont-start-it --require-cloud --one-time-build ${{ needs.file-check.outputs.skip-go }}'
  472. - name: Failure Notification
  473. uses: rtCamp/action-slack-notify@v2
  474. env:
  475. SLACK_COLOR: 'danger'
  476. SLACK_FOOTER: ''
  477. SLACK_ICON_EMOJI: ':github-actions:'
  478. SLACK_TITLE: 'Build tests for ${{ matrix.distro }} failed:'
  479. SLACK_USERNAME: 'GitHub Actions'
  480. SLACK_MESSAGE: |-
  481. ${{ github.repository }}: Build tests for ${{ matrix.distro }} failed.
  482. Checkout: ${{ steps.checkout.outcome }}
  483. Fetch test environment: ${{ steps.fetch.outcome }}
  484. Load test environment: ${{ steps.load.outcome }}
  485. netdata-installer, disable cloud: ${{ steps.build-no-cloud.outcome }}
  486. netdata-installer, require cloud: ${{ steps.build-cloud.outcome }}
  487. netdata-installer, no JSON-C: ${{ steps.build-no-jsonc.outcome }}
  488. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  489. if: >-
  490. ${{
  491. failure()
  492. && startsWith(github.ref, 'refs/heads/master')
  493. && github.event_name != 'pull_request'
  494. && github.repository == 'netdata/netdata'
  495. && needs.file-check.outputs.run == 'true'
  496. }}
  497. updater-check: # Test the generated dist archive using the updater code.
  498. name: Test Generated Distfile and Updater Code
  499. runs-on: ubuntu-latest
  500. if: github.event_name != 'workflow_dispatch'
  501. needs:
  502. - build-dist
  503. - matrix
  504. - prepare-test-images
  505. - file-check
  506. strategy:
  507. fail-fast: false
  508. max-parallel: 8
  509. matrix: ${{ fromJson(needs.matrix.outputs.matrix) }}
  510. services:
  511. apache: # This gets used to serve the dist tarball for the updater script.
  512. image: httpd:2.4
  513. ports:
  514. - 8080:80
  515. volumes:
  516. - ${{ github.workspace }}:/usr/local/apache2/htdocs/
  517. steps:
  518. - name: Skip Check
  519. id: skip
  520. if: needs.file-check.outputs.run != 'true'
  521. run: echo "SKIPPED"
  522. - name: Checkout
  523. id: checkout
  524. if: needs.file-check.outputs.run == 'true'
  525. uses: actions/checkout@v4
  526. - name: Fetch dist tarball artifacts
  527. id: fetch-tarball
  528. if: needs.file-check.outputs.run == 'true'
  529. uses: Wandalen/wretry.action@v3
  530. with:
  531. action: actions/download-artifact@v4
  532. with: |
  533. name: dist-tarball
  534. path: dist-tarball
  535. attempt_limit: 3
  536. attempt_delay: 2000
  537. - name: Prepare artifact directory
  538. id: prepare
  539. if: needs.file-check.outputs.run == 'true'
  540. run: |
  541. mkdir -p artifacts/download/v9999.0.0 || exit 1
  542. mkdir -p artifacts/latest || exit 1
  543. echo "v9999.0.0" > artifacts/latest/latest-version.txt || exit 1
  544. cp dist-tarball/* artifacts/download/v9999.0.0 || exit 1
  545. cd artifacts/download/v9999.0.0 || exit 1
  546. ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
  547. ls -lFh
  548. sha256sum -b ./* > "sha256sums.txt" || exit 1
  549. cat sha256sums.txt
  550. cd ../.. || exit 1
  551. ls -lR
  552. - name: Fetch test environment
  553. id: fetch-test-environment
  554. if: needs.file-check.outputs.run == 'true'
  555. uses: Wandalen/wretry.action@v3
  556. with:
  557. action: actions/download-artifact@v4
  558. with: |
  559. name: ${{ matrix.artifact_key }}-test-env
  560. path: .
  561. attempt_limit: 3
  562. attempt_delay: 2000
  563. - name: Load test environment
  564. id: load
  565. if: needs.file-check.outputs.run == 'true'
  566. run: docker load --input image.tar
  567. - name: Install netdata and run the updater on ${{ matrix.distro }}
  568. id: updater-check
  569. if: needs.file-check.outputs.run == 'true'
  570. run: |
  571. docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 --network host -w /netdata \
  572. -e EXTRA_INSTALL_FLAGS=${{ needs.file-check.outputs.skip-go }} \
  573. test:${{ matrix.artifact_key }} /netdata/.github/scripts/run-updater-check.sh
  574. - name: Failure Notification
  575. uses: rtCamp/action-slack-notify@v2
  576. env:
  577. SLACK_COLOR: 'danger'
  578. SLACK_FOOTER: ''
  579. SLACK_ICON_EMOJI: ':github-actions:'
  580. SLACK_TITLE: 'Updater checks for ${{ matrix.distro }} failed:'
  581. SLACK_USERNAME: 'GitHub Actions'
  582. SLACK_MESSAGE: |-
  583. ${{ github.repository }}: Updater checks for ${{ matrix.distro }} failed.
  584. Checkout: ${{ steps.checkout.outcome }}
  585. Fetch dist tarball: ${{ steps.fetch-tarball.outcome }}
  586. Prepare artifact directory: ${{ steps.prepare.outcome }}
  587. Fetch test environment: ${{ steps.fetch-test-environment.outcome }}
  588. Load test environment: ${{ steps.load.outcome }}
  589. Updater check: ${{ steps.updater-check.outcome }}
  590. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  591. if: >-
  592. ${{
  593. failure()
  594. && startsWith(github.ref, 'refs/heads/master')
  595. && github.event_name != 'pull_request'
  596. && github.repository == 'netdata/netdata'
  597. && needs.file-check.outputs.run == 'true'
  598. }}
  599. prepare-upload: # Consolidate the artifacts for uploading or releasing.
  600. name: Prepare Artifacts
  601. runs-on: ubuntu-latest
  602. needs:
  603. - build-dist
  604. - build-static
  605. - file-check
  606. steps:
  607. - name: Skip Check
  608. id: skip
  609. if: needs.file-check.outputs.run != 'true'
  610. run: echo "SKIPPED"
  611. - name: Checkout
  612. id: checkout
  613. if: needs.file-check.outputs.run == 'true'
  614. uses: actions/checkout@v4
  615. - name: Prepare Environment
  616. id: prepare
  617. if: needs.file-check.outputs.run == 'true'
  618. run: mkdir -p artifacts
  619. - name: Retrieve Build Artifacts
  620. id: fetch-dist
  621. if: needs.file-check.outputs.run == 'true'
  622. uses: Wandalen/wretry.action@v3
  623. with:
  624. action: actions/download-artifact@v4
  625. with: |
  626. pattern: dist-*
  627. path: dist-artifacts
  628. merge-multiple: true
  629. attempt_limit: 3
  630. attempt_delay: 2000
  631. - name: Prepare Artifacts
  632. id: consolidate
  633. if: needs.file-check.outputs.run == 'true'
  634. working-directory: ./artifacts/
  635. run: |
  636. mv ../dist-artifacts/* . || exit 1
  637. ln -s ${{ needs.build-dist.outputs.distfile }} netdata-latest.tar.gz || exit 1
  638. cp ../packaging/version ./latest-version.txt || exit 1
  639. cp ../integrations/integrations.js ./integrations.js || exit 1
  640. sha256sum -b ./* > sha256sums.txt || exit 1
  641. cat sha256sums.txt
  642. - name: Store Artifacts
  643. id: store
  644. if: needs.file-check.outputs.run == 'true'
  645. uses: actions/upload-artifact@v4
  646. with:
  647. name: final-artifacts
  648. path: artifacts/*
  649. retention-days: 30
  650. - name: Failure Notification
  651. uses: rtCamp/action-slack-notify@v2
  652. env:
  653. SLACK_COLOR: 'danger'
  654. SLACK_FOOTER: ''
  655. SLACK_ICON_EMOJI: ':github-actions:'
  656. SLACK_TITLE: 'Failed to prepare release artifacts for upload:'
  657. SLACK_USERNAME: 'GitHub Actions'
  658. SLACK_MESSAGE: |-
  659. ${{ github.repository }}: Failed to prepare release artifacts for upload.
  660. Checkout: ${{ steps.checkout.outcome }}
  661. Prepare environment: ${{ steps.prepare.outcome }}
  662. Fetch dist tarball: ${{ steps.fetch-dist.outcome }}
  663. Consolidate artifacts: ${{ steps.consolidate.outcome }}
  664. Store: ${{ steps.store.outcome }}
  665. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  666. if: >-
  667. ${{
  668. failure()
  669. && startsWith(github.ref, 'refs/heads/master')
  670. && github.event_name != 'pull_request'
  671. && github.repository == 'netdata/netdata'
  672. && needs.file-check.outputs.run == 'true'
  673. }}
  674. artifact-verification-dist: # Verify the regular installer works with the consolidated artifacts.
  675. name: Test Consolidated Artifacts (Source)
  676. runs-on: ubuntu-latest
  677. needs:
  678. - prepare-upload
  679. - file-check
  680. services:
  681. apache: # This gets used to serve the dist tarball for the updater script.
  682. image: httpd:2.4
  683. ports:
  684. - 8080:80
  685. volumes:
  686. - ${{ github.workspace }}:/usr/local/apache2/htdocs/
  687. steps:
  688. - name: Skip Check
  689. id: skip
  690. if: needs.file-check.outputs.run != 'true'
  691. run: echo "SKIPPED"
  692. - name: Checkout
  693. id: checkout
  694. if: needs.file-check.outputs.run == 'true'
  695. uses: actions/checkout@v4
  696. - name: Fetch artifacts
  697. id: fetch
  698. if: needs.file-check.outputs.run == 'true'
  699. uses: Wandalen/wretry.action@v3
  700. with:
  701. action: actions/download-artifact@v4
  702. with: |
  703. name: final-artifacts
  704. path: artifacts
  705. attempt_limit: 3
  706. attempt_delay: 2000
  707. - name: Prepare artifacts directory
  708. id: prepare
  709. if: needs.file-check.outputs.run == 'true'
  710. run: |
  711. mkdir -p download/latest
  712. mv artifacts/* download/latest
  713. ls -al download/latest
  714. - name: Verify that artifacts work with installer
  715. id: verify
  716. if: needs.file-check.outputs.run == 'true'
  717. env:
  718. NETDATA_TARBALL_BASEURL: http://localhost:8080/
  719. run: packaging/installer/kickstart.sh --build-only --dont-start-it --disable-telemetry --dont-wait
  720. - name: Failure Notification
  721. uses: rtCamp/action-slack-notify@v2
  722. env:
  723. SLACK_COLOR: 'danger'
  724. SLACK_FOOTER: ''
  725. SLACK_ICON_EMOJI: ':github-actions:'
  726. SLACK_TITLE: 'Artifact verification for source tarball failed.'
  727. SLACK_USERNAME: 'GitHub Actions'
  728. SLACK_MESSAGE: |-
  729. ${{ github.repository }}: Artifact verification for source tarball failed.
  730. Checkout: ${{ steps.checkout.outcome }}
  731. Fetch artifacts: ${{ steps.fetch.outcome }}
  732. Verify artifacts: ${{ steps.verify.outcome }}
  733. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  734. if: >-
  735. ${{
  736. failure()
  737. && startsWith(github.ref, 'refs/heads/master')
  738. && github.event_name != 'pull_request'
  739. && github.repository == 'netdata/netdata'
  740. && needs.file-check.outputs.run == 'true'
  741. }}
  742. artifact-verification-static: # Verify the static installer works with the consolidated artifacts.
  743. name: Test Consolidated Artifacts (Static)
  744. runs-on: ubuntu-latest
  745. needs:
  746. - prepare-upload
  747. - file-check
  748. services:
  749. apache: # This gets used to serve the static archives.
  750. image: httpd:2.4
  751. ports:
  752. - 8080:80
  753. volumes:
  754. - ${{ github.workspace }}:/usr/local/apache2/htdocs/
  755. steps:
  756. - name: Skip Check
  757. id: skip
  758. if: needs.file-check.outputs.run != 'true'
  759. run: echo "SKIPPED"
  760. - name: Checkout
  761. id: checkout
  762. if: needs.file-check.outputs.run == 'true'
  763. uses: actions/checkout@v4
  764. - name: Fetch artifacts
  765. id: fetch-artifacts
  766. if: needs.file-check.outputs.run == 'true'
  767. uses: Wandalen/wretry.action@v3
  768. with:
  769. action: actions/download-artifact@v4
  770. with: |
  771. name: final-artifacts
  772. path: artifacts
  773. attempt_limit: 3
  774. attempt_delay: 2000
  775. - name: Prepare artifacts directory
  776. id: prepare
  777. if: needs.file-check.outputs.run == 'true'
  778. run: |
  779. mkdir -p download/latest
  780. mv artifacts/* download/latest
  781. ls -al download/latest
  782. - name: Verify that artifacts work with installer
  783. id: verify
  784. if: needs.file-check.outputs.run == 'true'
  785. env:
  786. NETDATA_TARBALL_BASEURL: http://localhost:8080/
  787. run: packaging/installer/kickstart.sh --static-only --dont-start-it --disable-telemetry
  788. - name: Failure Notification
  789. uses: rtCamp/action-slack-notify@v2
  790. env:
  791. SLACK_COLOR: 'danger'
  792. SLACK_FOOTER: ''
  793. SLACK_ICON_EMOJI: ':github-actions:'
  794. SLACK_TITLE: 'Artifact verification for static build failed.'
  795. SLACK_USERNAME: 'GitHub Actions'
  796. SLACK_MESSAGE: |-
  797. ${{ github.repository }}: Artifact verification for static build failed.
  798. Checkout: ${{ steps.checkout.outcome }}
  799. Fetch artifacts: ${{ steps.fetch-artifacts.outcome }}
  800. Verify artifacts: ${{ steps.verify.outcome }}
  801. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  802. if: >-
  803. ${{
  804. failure()
  805. && startsWith(github.ref, 'refs/heads/master')
  806. && github.event_name != 'pull_request'
  807. && github.repository == 'netdata/netdata'
  808. && needs.file-check.outputs.run == 'true'
  809. }}
  810. upload-nightly: # Upload the nightly build artifacts to GCS.
  811. name: Upload Nightly Artifacts
  812. runs-on: ubuntu-latest
  813. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata'
  814. needs:
  815. - artifact-verification-dist
  816. - artifact-verification-static
  817. steps:
  818. - name: Retrieve Artifacts
  819. id: fetch
  820. uses: Wandalen/wretry.action@v3
  821. with:
  822. action: actions/download-artifact@v4
  823. with: |
  824. name: final-artifacts
  825. path: final-artifacts
  826. attempt_limit: 3
  827. attempt_delay: 2000
  828. - name: Authenticate to GCS
  829. id: gcs-auth
  830. uses: google-github-actions/auth@v2
  831. with:
  832. project_id: ${{ secrets.GCP_NIGHTLY_STORAGE_PROJECT }}
  833. credentials_json: ${{ secrets.GCS_STORAGE_SERVICE_KEY_JSON }}
  834. - name: Setup GCS
  835. id: gcs-setup
  836. uses: google-github-actions/setup-gcloud@v2.1.0
  837. - name: Upload Artifacts
  838. id: upload
  839. uses: google-github-actions/upload-cloud-storage@v2.1.0
  840. with:
  841. destination: ${{ secrets.GCP_NIGHTLY_STORAGE_BUCKET }}
  842. gzip: false
  843. path: ./final-artifacts/latest-version.txt
  844. parent: false
  845. - name: Failure Notification
  846. uses: rtCamp/action-slack-notify@v2
  847. env:
  848. SLACK_COLOR: 'danger'
  849. SLACK_FOOTER: ''
  850. SLACK_ICON_EMOJI: ':github-actions:'
  851. SLACK_TITLE: 'Failed to upload nightly release artifacts:'
  852. SLACK_USERNAME: 'GitHub Actions'
  853. SLACK_MESSAGE: |-
  854. ${{ github.repository }}: Failed to upload nightly release artifacts.
  855. Fetch artifacts: ${{ steps.fetch.outcome }}
  856. Authenticatie GCS: ${{ steps.gcs-auth.outcome }}
  857. Setup GCS: ${{ steps.gcs-setup.outcome }}
  858. Upload artifacts: ${{ steps.upload.outcome }}
  859. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  860. if: >-
  861. ${{
  862. failure()
  863. && startsWith(github.ref, 'refs/heads/master')
  864. && github.event_name != 'pull_request'
  865. }}
  866. create-nightly: # Create a nightly build release in netdata/netdata-nightlies
  867. name: Create Nightly Release
  868. runs-on: ubuntu-latest
  869. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'nightly' && github.repository == 'netdata/netdata'
  870. needs:
  871. - artifact-verification-dist
  872. - artifact-verification-static
  873. steps:
  874. - name: Checkout Main Repo
  875. id: checkout-main
  876. uses: actions/checkout@v4
  877. with:
  878. path: main
  879. - name: Checkout Nightly Repo
  880. id: checkout-nightly
  881. uses: actions/checkout@v4
  882. with:
  883. repository: netdata/netdata-nightlies
  884. path: nightlies
  885. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  886. - name: Retrieve Artifacts
  887. id: fetch
  888. uses: Wandalen/wretry.action@v3
  889. with:
  890. action: actions/download-artifact@v4
  891. with: |
  892. name: final-artifacts
  893. path: final-artifacts
  894. attempt_limit: 3
  895. attempt_delay: 2000
  896. - name: Prepare version info
  897. id: version
  898. run: |
  899. # shellcheck disable=SC2129
  900. echo "version=$(cat main/packaging/version)" >> "${GITHUB_OUTPUT}"
  901. echo "commit=$(cd nightlies && git rev-parse HEAD)" >> "${GITHUB_OUTPUT}"
  902. echo "date=$(date +%F)" >> "${GITHUB_OUTPUT}"
  903. - name: Create Release
  904. id: create-release
  905. uses: ncipollo/release-action@v1
  906. with:
  907. allowUpdates: false
  908. artifactErrorsFailBuild: true
  909. artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js'
  910. owner: netdata
  911. repo: netdata-nightlies
  912. body: Netdata nightly build for ${{ steps.version.outputs.date }}.
  913. commit: ${{ steps.version.outputs.commit }}
  914. makeLatest: true
  915. tag: ${{ steps.version.outputs.version }}
  916. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  917. - name: Checkout netdata main Repo # Checkout back to netdata/netdata repo to the update latest packaged versions
  918. id: checkout-netdata
  919. uses: actions/checkout@v4
  920. with:
  921. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  922. - name: Init python environment for publish release metadata
  923. uses: actions/setup-python@v5
  924. id: init-python
  925. with:
  926. python-version: "3.12"
  927. - name: Setup python environment
  928. id: setup-python
  929. run: |
  930. pip install -r .github/scripts/modules/requirements.txt
  931. - name: Check if the version is latest and published
  932. id: check-latest-version
  933. run: |
  934. python .github/scripts/check_latest_versions.py ${{ steps.version.outputs.version }}
  935. - name: SSH setup
  936. id: ssh-setup
  937. if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-latest-version.outputs.versions_needs_update == 'true'
  938. uses: shimataro/ssh-key-action@v2
  939. with:
  940. key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }}
  941. name: id_ecdsa
  942. known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }}
  943. - name: Sync newer releases
  944. id: sync-releases
  945. if: github.event_name == 'workflow_dispatch' && github.repository == 'netdata/netdata' && steps.check-latest-version.outputs.versions_needs_update == 'true'
  946. run: |
  947. .github/scripts/upload-new-version-tags.sh
  948. - name: Failure Notification
  949. uses: rtCamp/action-slack-notify@v2
  950. env:
  951. SLACK_COLOR: 'danger'
  952. SLACK_FOOTER: ''
  953. SLACK_ICON_EMOJI: ':github-actions:'
  954. SLACK_TITLE: 'Failed to draft release:'
  955. SLACK_USERNAME: 'GitHub Actions'
  956. SLACK_MESSAGE: |-
  957. ${{ github.repository }}: Failed to create nightly release or attach artifacts.
  958. Checkout netdata/netdata: ${{ steps.checkout-main.outcome }}
  959. Checkout netdata/netdata-nightlies: ${{ steps.checkout-nightly.outcome }}
  960. Fetch artifacts: ${{ steps.fetch.outcome }}
  961. Prepare version info: ${{ steps.version.outcome }}
  962. Create release: ${{ steps.create-release.outcome }}
  963. Checkout back netdata/netdata: ${{ steps.checkout-netdata.outcome }}
  964. Init python environment: ${{ steps.init-python.outcome }}
  965. Setup python environment: ${{ steps.setup-python.outcome }}
  966. Check the nearly published release against the advertised: ${{ steps.check-latest-version.outcome }}
  967. Setup ssh: ${{ steps.ssh-setup.outcome }}
  968. Sync with the releases: ${{ steps.sync-releases.outcome }}
  969. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  970. if: >-
  971. ${{
  972. failure()
  973. && github.event_name == 'workflow_dispatch'
  974. }}
  975. normalize-tag: # Fix the release tag if needed
  976. name: Normalize Release Tag
  977. runs-on: ubuntu-latest
  978. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'release'
  979. outputs:
  980. tag: ${{ steps.tag.outputs.tag }}
  981. steps:
  982. - name: Normalize Tag
  983. id: tag
  984. run: |
  985. if echo ${{ github.event.inputs.version }} | grep -qE '^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$'; then
  986. echo "tag=v${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
  987. else
  988. echo "tag=${{ github.event.inputs.version }}" >> "${GITHUB_OUTPUT}"
  989. fi
  990. upload-release: # Create the draft release and upload the build artifacts.
  991. name: Create Release Draft
  992. runs-on: ubuntu-latest
  993. if: github.event_name == 'workflow_dispatch' && github.event.inputs.type == 'release' && github.repository == 'netdata/netdata'
  994. needs:
  995. - artifact-verification-dist
  996. - artifact-verification-static
  997. - normalize-tag
  998. steps:
  999. - name: Checkout
  1000. id: checkout
  1001. uses: actions/checkout@v4
  1002. - name: Retrieve Artifacts
  1003. id: fetch
  1004. uses: Wandalen/wretry.action@v3
  1005. with:
  1006. action: actions/download-artifact@v4
  1007. with: |
  1008. name: final-artifacts
  1009. path: final-artifacts
  1010. attempt_limit: 3
  1011. attempt_delay: 2000
  1012. - name: Create Release
  1013. id: create-release
  1014. uses: ncipollo/release-action@v1
  1015. with:
  1016. allowUpdates: false
  1017. artifactErrorsFailBuild: true
  1018. artifacts: 'final-artifacts/sha256sums.txt,final-artifacts/netdata-*.tar.gz,final-artifacts/netdata-*.gz.run,final-artifacts/integrations.js'
  1019. draft: true
  1020. tag: ${{ needs.normalize-tag.outputs.tag }}
  1021. token: ${{ secrets.NETDATABOT_GITHUB_TOKEN }}
  1022. - name: Failure Notification
  1023. uses: rtCamp/action-slack-notify@v2
  1024. env:
  1025. SLACK_COLOR: 'danger'
  1026. SLACK_FOOTER: ''
  1027. SLACK_ICON_EMOJI: ':github-actions:'
  1028. SLACK_TITLE: 'Failed to draft release:'
  1029. SLACK_USERNAME: 'GitHub Actions'
  1030. SLACK_MESSAGE: |-
  1031. ${{ github.repository }}: Failed to create draft release or attach artifacts.
  1032. Checkout: ${{ steps.checkout.outcome }}
  1033. Fetch artifacts: ${{ steps.fetch.outcome }}
  1034. Create draft release: ${{ steps.create-release.outcome }}
  1035. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  1036. if: >-
  1037. ${{
  1038. failure()
  1039. && github.event_name == 'workflow_dispatch'
  1040. }}
  1041. - name: Success Notification
  1042. uses: rtCamp/action-slack-notify@v2
  1043. env:
  1044. SLACK_COLOR: 'good'
  1045. SLACK_FOOTER: ''
  1046. SLACK_ICON_EMOJI: ':github-actions:'
  1047. SLACK_TITLE: 'Created agent draft release:'
  1048. SLACK_USERNAME: 'GitHub Actions'
  1049. SLACK_MESSAGE: "${{ github.repository }}: ${{ steps.create-release.outputs.html_url }}"
  1050. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  1051. if: >-
  1052. ${{
  1053. success()
  1054. && github.event_name == 'workflow_dispatch'
  1055. }}