Skip to content

Bump actions/checkout from 4.2.1 to 4.2.2 #107

Bump actions/checkout from 4.2.1 to 4.2.2

Bump actions/checkout from 4.2.1 to 4.2.2 #107

Workflow file for this run

name: CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
upgrade:
strategy:
matrix:
os:
- macos-12
- macos-13
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap (pre-Sonoma)
if: matrix.os != 'macos-14'
run: |
mkdir -p /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Setup Homebrew Tap (Sonoma)
if: matrix.os == 'macos-14'
run: |
mkdir -p /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Run Brew Cask Upgrade
run: brew cu -y -a --no-brew-update
- name: Check no reported updates
run: brew cu -y -a --no-brew-update --report-only
pinning-workflow:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Verify cask is reporting outdated
run: brew cu --all --no-brew-update google-chrome --report-only || test $? -eq 1
- name: Pin google-chrome
run: brew cu pin google-chrome
- name: Verify it is not reporting outdated
run: brew cu --all --no-brew-update google-chrome --report-only
- name: Unpin google-chrome
run: brew cu unpin google-chrome
- name: Verify it is reporting outdated
run: brew cu --all --no-brew-update google-chrome --report-only || test $? -eq 1
pinned-export-workflow:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Pin google-chrome
run: brew cu pin google-chrome
- name: Export pinned casks
run: brew cu pinned --export exported.txt
- name: Setup expected file
run: echo "google-chrome" > expected.txt
- name: Verify exported file is as expected
run: cmp exported.txt expected.txt
pinned-load-workflow:
strategy:
matrix:
os:
- macos-14
runs-on: ${{ matrix.os }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/[email protected]
- name: Brew Update
run: |
brew update
brew --version
- name: Setup Homebrew Tap
run: |
mkdir -p /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
cp -rf . /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade
- name: Setup backup file
run: echo "google-chrome" > /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/backup.txt
- name: Import backup file
run: brew cu pinned --load /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade/backup.txt
- name: Verify exported file is as expected
run: cd /opt/homebrew/Library/Taps/buo/homebrew-cask-upgrade && cmp pinned backup.txt