au.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. name: Auto Update
  2. on:
  3. workflow_dispatch: # Enable manual trigger
  4. inputs:
  5. forced_packages:
  6. description: The list of packages to forcibly update (like "pkg1:ver1 pkg2")
  7. required: false
  8. schedule:
  9. - cron: 5 */8 * * *
  10. jobs:
  11. auto_update:
  12. runs-on: windows-latest
  13. defaults:
  14. run:
  15. shell: powershell
  16. steps:
  17. - uses: actions/checkout@v4
  18. with:
  19. fetch-depth: 100
  20. - name: Check a build environment
  21. run: |
  22. Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version
  23. $PSVersionTable
  24. git --version
  25. choco --version
  26. - name: Initialize Git config
  27. run: |
  28. git config --global user.email "chocolatey@realdimensions.net"
  29. git config --global user.name "Chocolatey"
  30. git config --global core.safecrlf false
  31. - name: Install AU
  32. run: |
  33. git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au
  34. . "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version
  35. - name: Install Latest Release on GitHub Helper
  36. run: choco install largh --yes
  37. - name: Check update for packages
  38. run: |
  39. $ErrorActionPreference = 'Continue'
  40. ./update_all.ps1 -ForcedPackages '${{ github.event.inputs.forced_packages }}'
  41. 7z a au_temp.zip $Env:TEMP\chocolatey\au\*
  42. env:
  43. # Set au version to use or omit to use the latest. Specify branch name to use development version from Github
  44. #au_version:
  45. au_push: true
  46. # Github token to commit pushed packages to repository
  47. github_user_repo: ${{ github.repository }}
  48. github_api_key: ${{ secrets.AU_GITHUB_API_KEY }}
  49. # Mail credentials - for error notifications
  50. mail_to: ${{ secrets.MAIL_TO }}
  51. mail_from: ${{ secrets.MAIL_FROM }}
  52. mail_user: ${{ secrets.MAIL_USER }}
  53. mail_pass: ${{ secrets.MAIL_PASS }}
  54. mail_server: mail.douglasthrift.net
  55. mail_port: 587
  56. mail_enablessl: true
  57. # ID of the gist used to save run results - create a gist under the github_user (secret or not) and grab the id - https://gist.github.com/name/id
  58. # Optional, leave empty to create anonymous gist
  59. gist_id: d98014ed4fcaa5cc65bb902f21ce366a
  60. # Force test: gist id for test results
  61. gist_id_test: b003c5505c6cc5c6a67f8de9e68c183
  62. # Chocolatey API key - to push updated packages
  63. api_key: ${{ secrets.CHOCOLATEY_API_KEY }}
  64. - name: Upload update results
  65. uses: actions/upload-artifact@v4
  66. with:
  67. name: update_results
  68. path: |
  69. update_info.xml
  70. Update-AUPackages.md
  71. au_temp.zip