kickstart-upload.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. # Upload the kickstart script to the repo server
  3. name: Upload Kickstart Script
  4. on:
  5. push:
  6. branches:
  7. - master
  8. paths:
  9. - .github/workflows/kickstart-upload.yml
  10. - packaging/installer/kickstart.sh
  11. workflow_dispatch: null
  12. concurrency:
  13. group: kickstart-upload
  14. cancel-in-progress: true
  15. jobs:
  16. upload:
  17. name: Upload Kickstart Script
  18. runs-on: ubuntu-latest
  19. if: github.repository == 'netdata/netdata'
  20. steps:
  21. - name: Checkout
  22. id: checkout
  23. uses: actions/checkout@v4
  24. with:
  25. fetch-depth: 1
  26. - name: SSH setup
  27. id: ssh-setup
  28. uses: shimataro/ssh-key-action@v2
  29. with:
  30. key: ${{ secrets.NETDATABOT_PACKAGES_SSH_KEY }}
  31. name: id_ecdsa
  32. known_hosts: ${{ secrets.PACKAGES_KNOWN_HOSTS }}
  33. - name: Upload to packages.netdata.cloud
  34. id: upload-primary
  35. continue-on-error: true
  36. run: rsync -vp packaging/installer/kickstart.sh netdatabot@packages.netdata.cloud:/home/netdatabot/incoming/kickstart.sh
  37. - name: Upload to packages2.netdata.cloud
  38. id: upload-packages2
  39. run: rsync -vp packaging/installer/kickstart.sh netdatabot@packages2.netdata.cloud:/home/netdatabot/incoming/kickstart.sh
  40. - name: Failure Notification
  41. uses: rtCamp/action-slack-notify@v2
  42. env:
  43. SLACK_COLOR: 'danger'
  44. SLACK_ICON_EMOJI: ':github-actions:'
  45. SLACK_TITLE: 'Kickstart upload failed:'
  46. SLACK_USERNAME: 'GitHub Actions'
  47. SLACK_MESSAGE: |-
  48. ${{ github.repository }}: Failed to upload updated kickstart script to repo server.
  49. Checkout: ${{ steps.checkout.outcome }}
  50. Import SSH Key: ${{ steps.ssh-setup.outcome }}
  51. Upload to packages.netdata.cloud: ${{ steps.upload-packages.outcome }}
  52. Upload to packages2.netdata.cloud: ${{ steps.upload-packages2.outcome }}
  53. SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
  54. if: >-
  55. ${{
  56. failure()
  57. && startsWith(github.ref, 'refs/heads/master')
  58. && github.repository == 'netdata/netdata'
  59. }}