Action provides easy way to start working with sf cli in your GitHub workflows. Installing cli using this action is much more effective than using the sfdx docker container. Action characteristics:
- easy to use - 1 line to install and cache the latest version of CLI
- very fast thanks to implemented auto-caching
- easy to switch between different CLI versions when needed
- running on runner directly allows to use runner preinstalled tools, eg. java, chromium, node
- covered by extensive unit tests to achieve the confidence of stability
Put this line into job in your workflow:
- uses: patrykacc/[email protected]
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: patrykacc/[email protected]
- name: CLI Health check
run: |
echo "CLI Installed succesfuly!"
sf -v
By default, the action installs the latest version of CLI and cache it under specific version key.
If you require any other specific version of CLI to be installed, there is version
input provided,
where you can specify which exactly version should be installed.
- name: Install CLI
uses: patrykacc/[email protected]
with:
version: 2.55.0
You can easily externalize to GitHub setup the configuration, so you can manage CLI versions, without code modifications:
- name: Install CLI
uses: patrykacc/[email protected]
with:
version: ${{ vars.SF_CLI_VERSION }} # eg. 'latest'
If my work is helpfull for you simply click star button - it gives a lot of fuel to bring more actions for our Salesforce community!
Released under MIT by @patrykacc.