Skip to content

Auto Update

Auto Update #4544

Workflow file for this run

name: Auto Update
on:
workflow_dispatch: # Enable manual trigger
inputs:
forced_packages:
description: The list of packages to forcibly update (like "pkg1:ver1 pkg2")
required: false
schedule:
- cron: '5 0/8 * * *'
jobs:
auto_update:
runs-on: windows-2019
defaults:
run:
shell: powershell
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
submodules: recursive
- name: Check a build environment
run: |
Get-CimInstance win32_operatingsystem -Property Caption, OSArchitecture, Version | fl Caption, OSArchitecture, Version
$PSVersionTable
git --version
choco --version
cmd /c "set" | grep -i 'github\|runner' | sort
- name: Initialize Git config
run: |
git config --global user.email "chocolatey@realdimensions.net"
git config --global user.name "Chocolatey"
git config --global core.safecrlf false
- 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
env:
au_version: master
- name: Check update for packages
run: |
$ErrorActionPreference = 'Continue'
./update_all.ps1 -ForcedPackages '${{ github.event.inputs.forced_packages }}'
7z a au_temp.zip $Env:TEMP\chocolatey\au\*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # To authenticate GitHub CLI
au_push: true
au_pushurl: https://www.myget.org/F/kai2nenobu # Where to push packages
# Github token to commit pushed packages to repository
github_user_repo: ${{ github.repository }}
github_api_key: ${{ secrets.AU_GITHUB_API_KEY }}
# 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
# Optional, leave empty to create anonymous gist
gist_id: 4df33f42a891ced2fe169974fd3d58ec
# Force test: gist id for test results
gist_id_test:
# Chocolatey API key - to push updated packages
api_key: ${{ secrets.MYGET_API_KEY }}
# Slack webhook URL
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
# GitHub Actions build url which points to this build
GH_ACTIONS_BUILD_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- name: Upload update results
uses: actions/upload-artifact@v3
with:
name: update_results
path: |
update_info.xml
Update-AUPackages.md
au_temp.zip