diff --git a/.github/workflows/setup_atlas.yml b/.github/workflows/setup_atlas.yml index d399ebf..93f8878 100644 --- a/.github/workflows/setup_atlas.yml +++ b/.github/workflows/setup_atlas.yml @@ -35,3 +35,8 @@ jobs: echo "Version mismatch: expected ${{ steps.atlas-version.outputs.version }}, got $INSTALLED_VERSION" exit 1 fi + - name: Check Snowflake flavor installed correctly + uses: ./ + with: + flavor: snowflake + diff --git a/README.md b/README.md index 7bdfaaf..e73d81e 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,16 @@ If you want to install the beta version of Atlas, specify `beta` as the version: version: "beta" ``` +### Flavor + +If you want to install a specific driver flavor of Atlas, you can do so by specifing the `flavor` parameter. + +```yaml + - uses: ariga/setup-atlas@master + with: + flavor: "snowflake" +``` + ### cloud-token The Atlas Cloud token to use for authentication. Must be passed as a secret. diff --git a/action.yml b/action.yml index baf18ce..aabb12e 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,9 @@ inputs: description: 'Which version of Atlas to install, in the format of "v0.14.1"' required: false default: 'latest' + flavor: + description: 'Which flavor of Atlas to install' + required: false cloud-token: description: API token to authenticate to an Atlas Cloud organization required: false @@ -17,11 +20,20 @@ runs: steps: - if: runner.os != 'Windows' shell: bash - run: curl -sSf https://atlasgo.sh | ATLAS_VERSION=${{inputs.version}} CI=true sh + run: | + if [ -n "${{ inputs.flavor }}" ]; then + curl -sSf https://atlasgo.sh | ATLAS_FLAVOR=${{ inputs.flavor }} CI=true sh + else + curl -sSf https://atlasgo.sh | ATLAS_VERSION=${{ inputs.version }} CI=true sh + fi - if: runner.os == 'Windows' shell: pwsh run: | - $url = "https://release.ariga.io/atlas/atlas-windows-amd64-${{ inputs.version }}.exe" + $version = "${{ inputs.version }}" + if ("${{ inputs.flavor }}" -ne "") { + $version = "extended" + } + $url = "https://release.ariga.io/atlas/atlas-windows-amd64-$version.exe" $targetPath = "$env:LocalAppData\Programs\Atlas" New-Item -Path $targetPath -ItemType Directory -Force curl -L $url -o "$targetPath\atlas.exe"