Skip to content

Commit

Permalink
action/cloud_token: added cloud-token to initiate atlas-login (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
dorav authored Sep 24, 2023
1 parent 6b510dd commit d52cd13
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ By default, the `latest` version of Atlas is being used. If you want to lock a s
with:
version: "vX.Y.Z"
```
### cloud-token
The Atlas Cloud token to use for authentication. Must be passed as a secret.
```yaml
- uses: ariga/setup-atlas@master
with:
cloud-token: ${{ secrets.ATLAS_CLOUD_TOKEN }}
```
## Legal
Expand Down
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ inputs:
description: 'Which version of Atlas to install, in the format of "v0.14.1"'
required: false
default: 'latest'
cloud-token:
description: API token to authenticate to an Atlas Cloud organization
required: false
runs:
using: "composite"
steps:
- run: curl -sSf https://atlasgo.sh | ATLAS_VERSION=${{inputs.version}} CI=true sh
shell: bash

- name: Login to Atlas
if: inputs.cloud-token != null
shell: bash
run: atlas login --token ${{ inputs.cloud-token }}

0 comments on commit d52cd13

Please sign in to comment.