scoop-setup
action provides functions below- Install
scoop
to your Windows runner - Update
PATH
environment variable - Install applications with
scoop
- Install
- If you want to install "sfsu" and "trunk", put codes like this into your workflow YAML
- uses: winpax/[email protected]
with:
buckets: extras
apps: sfsu trunk
windows-latest
windows-2019
- Parameters can be specified by
with:
like this
with:
buckets: extras
checkup: "true"
- If
true
(default),scoop
will be installed - If
false
,scoop
will not be installed- For example, if scoop was restored from cache, you can skip installation
- If
true
(default),scoop
will be installed with-RunAsAdmin
- Windows Runners provided by GitHub may need this, because currently they run with Administrator privilege
- Specify bucket(s) to add
- Delimit several buckets by white space like as
extras nonportable games
- Bucket(s) specified by this parameter must be "known" buckets, you can confirm them by
scoop bucket known
command
- Delimit several buckets by white space like as
- This parameter is optional, no extra buckets will be added if omitted
- Specify application(s) to add
- Multiple applications should be delimited by white space (e.g
sfsu trunk
)
- Multiple applications should be delimited by white space (e.g
- This parameter is optional, no applications will be installed if omitted
- If
true
(default),scoop update
will be run after installation
- If
true
,scoop checkup
will be run after installation
- If
true
(default), path toscoop
will be added to thePATH
environment variable
- If cache is available,
install_scoop
should befalse
to skip installation - Include
packages_to_install
into cache seed to validate cache is including enough apps or not - Increment
cache_version
if cache should be expired without changingpackages_to_install
env:
packages_to_install: shellcheck
cache_version: v0
cache_hash_seed_file_path: "./.github/workflows/cache_seed_file_for_scoop.txt"
(snipped)
jobs:
build:
steps:
- name: Create cache seed file
run: echo ${{ env.packages_to_install }} >> ${{ env.cache_hash_seed_file_path }}
- name: Restore cache if available
id: restore_cache
uses: actions/cache@v4
with:
path: ${{ matrix.to_cache_dir }}
key: cache_version_${{ env.cache_version }}-${{ hashFiles(env.cache_hash_seed_file_path) }}
- name: Install scoop (Windows)
uses: winpax/[email protected]
if: steps.restore_cache.outputs.cache-hit != 'true'
with:
install_scoop: "true"
buckets: extras
apps: ${{ env.packages_to_install }}
update: "true"
update_path: "true"
- name: Setup scoop PATH (Windows)
uses: winpax/[email protected]
if: steps.restore_cache.outputs.cache-hit == 'true'
with:
install_scoop: "false"
update: "false"
update_path: "true"
Made with 💗 by Juliette Cordor
Thanks to Minoru Sekine for creating the original setup-scoop
action