This commit is contained in:
David Refoua 2022-10-16 14:56:30 +03:30
commit e1caeb879a
2 changed files with 65 additions and 0 deletions

40
.github/workflows/vendor.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Update Vendor
on:
workflow_dispatch:
schedule:
# At 13:37 UTC every day.
- cron: '37 13 * * *'
defaults:
run:
shell: pwsh
permissions:
contents: read
jobs:
vendor:
runs-on: windows-latest
continue-on-error: false
timeout-minutes: 15
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
# TODO
- uses: peter-evans/create-pull-request@v4
with:
title: 'Actions: Updates to the vendored dependencies'
body: 'Automatic changes'
commit-message: 'Update vendored dependencies'
branch: update-vendor
base: master

View File

@ -67,6 +67,31 @@ function Digest-Hash($path) {
return Invoke-Expression "md5sum $path"
}
function Set-GHVariable {
param(
[Parameter(Mandatory = $true)]
[string]$Name,
[Parameter(Mandatory = $true)]
[string]$Value
)
Write-Verbose "Setting CI variable $Name to $Value" -Verbose
if ($env:GITHUB_ENV) {
"$Name=$Value" | Out-File $env:GITHUB_ENV -Append
}
}
function Get-GHTempPath {
$temp = [System.IO.Path]::GetTempPath()
if ($env:RUNNER_TEMP) {
$temp = $env:RUNNER_TEMP
}
Write-Verbose "Get CI Temp path: $temp" -Verbose
return $temp
}
function Get-VersionStr() {
# Clear existing variable
if ($string) { Clear-Variable -name string }