au-updater #3502
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: au-updater | |
on: | |
schedule: | |
- cron: "7 0/4 * * *" # runs at 7 minutes past the hour every 4 hours | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
update-packages: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: powershell | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Build Evironment Info | |
run: | | |
Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version | |
$PSVersionTable | |
git --version | |
choco --version | |
go version | |
- name: Initialize Git config | |
run: | | |
git config --global user.email "chocolatey@mike.ee" | |
git config --global user.name "mikeee" | |
git config --global core.safecrlf false | |
- name: Install Chocolatey Core Extensions | |
run: | | |
choco install chocolatey-core.extension | |
- name: Install AU | |
run: | | |
git clone -q https://github.com/majkinetor/au.git $Env:TEMP/au | |
. "$Env:TEMP/au/scripts/Install-AU.ps1" $Env:au_version | |
- name: Test all packages | |
if: github.event_name == 'pull_request' | |
run: | | |
$ErrorActionPreference = 'Continue' | |
./update_all.ps1 | |
7z a au_temp.zip $Env:TEMP\chocolatey\au\* | |
env: | |
au_version: # omitting to use latest | |
au_push: false | |
au_test_groups: 1 | |
- name: Update all packages | |
if: github.event_name != 'pull_request' | |
run: | | |
$ErrorActionPreference = 'Continue' | |
./update_all.ps1 | |
7z a au_temp.zip $Env:TEMP\chocolatey\au\* | |
env: | |
au_version: # omitting to use latest | |
au_push: true | |
au_test_groups: 1 | |
# Chocolatey API key to push packages | |
api_key: ${{ secrets.CHOCOLATEY_API_KEY}} | |
github_user_repo: ${{ github.repository }} | |
github_api_key: ${{ secrets.GH_TOKEN }} | |
gist_id: 17b5a042cba1bd9da2bf21615aab4f0f | |
# Used for test reporting | |
gist_id_test: ${{ secrets.GIST_ID_TEST }} | |
# mail_destination: chocolatey@mike.ee | |
# mail_user: | |
# mail_pass: | |
# mail_server: smtp.gmail.com | |
# mail_port: 587 | |
# mail_enablessl: true | |
- name: Upload artifacts | |
if: github.event_name != 'pull_request' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: update_results | |
path: | | |
update_info.xml | |
Update-AUPackages.md | |
au_temp.zip |