Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/setup_atlas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
16 changes: 14 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down