Set env var instead of using output #189
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: ci | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
TERM: xterm | |
jobs: | |
test: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
command: | |
- help | |
- clone | |
- link | |
- install-brew | |
- install-defaults | |
- install-fisher | |
- install-vim | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ matrix.command == 'install-brew' }} | |
run: brew update | |
- if: ${{ matrix.command == 'install-brew' }} | |
name: Run brew uninstall go | |
run: | | |
versions=$(brew list | grep -E '^go$|^go@' || true) | |
echo $versions | |
for v in $versions | |
do | |
echo "brew uninstall $v" | |
brew uninstall $v | |
done | |
- if: ${{ matrix.command == 'install-brew' }} | |
id: skip | |
name: Skip mas installs | |
run: | | |
ids=$(cat Brewfile | grep -oE "[0-9]{9,}" | tr '\n' ' ') | |
echo $ids | |
echo "HOMEBREW_BUNDLE_MAS_SKIP=$ids" >> "$GITHUB_ENV" | |
- run: ./dot.sh ${{ matrix.command }} |