-
Notifications
You must be signed in to change notification settings - Fork 16
51 lines (41 loc) · 1.23 KB
/
cron-powershell.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
name: PowerShell scheduled update
permissions: read-all
on:
workflow_dispatch:
schedule:
# At 20:20 UTC on every day-of-week from Monday through Friday.
- cron: '0 0/4 * * *'
defaults:
run:
shell: pwsh
env:
FORMULA_PATH: ./Formula/powershell.rb
UPDATE_SCRIPT_PATH: ./scripts/Upgrade-Formula.ps1
FORMULA_NAME: powershell
CHANNEL_NAME: stable
HOMEBREW_NO_ENV_HINTS: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
homebrew-formula-stable:
timeout-minutes: 15
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Prepare Agent
uses: ./.github/workflows/composite/prep
- name: Uninstall PowerShell
shell: bash
run: |
cd /
PKG_ID='com.microsoft.powershell'
pkgutil --only-files --files ${PKG_ID} | awk '!/\.app/' | tr '\n' '\0' | xargs -n 1 -0 -p sudo rm
sudo pkgutil --forget ${PKG_ID}
- name: Install and Test Formula
uses: ./.github/workflows/composite/installAndTest
- name: Create PR if needed
uses: ./.github/workflows/composite/createPR
with:
token: ${{ secrets.PR_PAT }}