Skip to content

Commit

Permalink
Fix example in README.md (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-turbaszek authored Apr 24, 2024
1 parent 2afb98b commit 6a4ff69
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
# Snowflake CLI Github Action

**Note:** Snowflake CLI Github Action is in early development phase. The project may change or be abandoned. Do not use for production use cases.
**Note:** Snowflake CLI Github Action is in early development phase. The project may change or be
abandoned. Do not use for production use cases.

Streamlines installing and using [Snowflake CLI](https://docs.snowflake.com/developer-guide/snowflake-cli-v2/index) in your CI/CD workflows. The CLI is installed in isolated way making sure it won't conflict with dependencies of your project. And automatically set up the input config file within the ~/.snowflake/ directory.
Streamlines installing and using [Snowflake CLI](https://docs.snowflake.com/developer-guide/snowflake-cli-v2/index) in your CI/CD workflows. The CLI is installed in
isolated way making sure it won't conflict with dependencies of your project. Automatically set up
the input config file within the ~/.snowflake/ directory.


## Inputs

### ` cli-version`

The specified Snowflake CLI version. For example `2.2.2`.
The specified Snowflake CLI version. For example `2.2.0`. If not specified then latest version will be used.


### `default-config-file-path`

Path to the config.toml file in your repository.
Path to the configuration file (config.toml) in your repository. The path must be relative to root of repository.


## Example usage
Expand All @@ -26,12 +29,20 @@ jobs:
version:
name: "Check Snowflake CLI version"
runs-on: ubuntu-latest
steps:
- uses: Snowflake-Labs/snowflake-cli-action@v1
steps:
# Checkout step is necessary if you want to use a config file from your repo
- name: Checkout repo
uses: actions/checkout@v4
with:
cli-version: "2.1.0"
config_file: "config.toml"
persist-credentials: false

# Snowflake CLI installation
- uses: Snowflake-Labs/snowflake-cli-action@v1
with:
cli-version: "latest"
default-config-file-path: "config.toml"

# Use the CLI
- name: Test version
run: snow --version
```
2 changes: 0 additions & 2 deletions scripts/install-snowcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ fi
mkdir "$PIPX_BIN_DIR/snow_pipx_path"
cp "$PIPX_BIN_DIR/snow$extension" "$PIPX_BIN_DIR/snow_pipx_path"
echo "$PIPX_BIN_DIR/snow_pipx_path" >> $GITHUB_PATH


4 changes: 2 additions & 2 deletions scripts/setup-config-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

if [ ! -e $CONFIG_FILE_PATH ]
then
echo "File $CONFIG_FILE_PATH not found, default config.toml file was not set up in this job."
echo "Provided file $CONFIG_FILE_PATH not found, using default config file."
exit 0
fi

Expand All @@ -18,4 +18,4 @@ if [[ ! $RUNNER_OS = "Windows" ]]; then
fi

mkdir -p ~/.snowflake/
mv ./temp/config.toml ~/.snowflake/
mv ./temp/config.toml ~/.snowflake/

0 comments on commit 6a4ff69

Please sign in to comment.