Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action: implemented and added README #1

Merged
merged 4 commits into from
Sep 7, 2023
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
10 changes: 10 additions & 0 deletions .github/workflows/setup_atlas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Setup Atlas
run-name: I'm using Atlas 🚀
on: [push]
jobs:
use-atlas:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
- run: atlas version
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
# setup-atlas
A GitHub Action to install ariga/atlas in your workflows.
# setup-action

A GitHub Action for installing [Atlas](https://github.com/ariga/atlas).

> See the docs for other [Atlas GitHub Actions](https://atlasgo.io/integrations/github-actions) for operations such as linting, syncing, or deploying your migration directory.

## Usage

Add `.github/workflows/deploy-schema.yaml` to your repo with the following contents:

```yaml
name: Deploy schema changes
run-name: I'm using Atlas 🚀
on: [push]
jobs:
use-atlas:
runs-on: ubuntu-latest
steps:
- uses: ariga/setup-atlas@master
- run: atlas version
# - run: atlas schema apply ...
```

## Inputs

### Version

By default, the `latest` version of Atlas is being used. If you want to lock a specific version of Atlas, you can do so by specifing the `version` parameter.

```yaml
- uses: ariga/setup-atlas@master
with:
version: "vX.Y.Z"
```


## Legal

The source code for this GitHub Action is released under the Apache 2.0
License, see [LICENSE](LICENSE).

This action downloads a binary version of [Atlas](https://atlasgo.io) which
is distributed under the [Ariga EULA](https://ariga.io/legal/atlas/eula).
16 changes: 16 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Installs Atlas'
description: 'Installs a specific version of Atlas'
branding:
icon: database
author: 'Ariga'
inputs:
version:
description: 'Which version of Atlas to install, in the format of "v0.14.1"'
required: false
default: 'latest'
runs:
using: "composite"
steps:
- run: curl -sSf https://atlasgo.sh | ATLAS_VERSION=${{inputs.version}} CI=true sh
shell: bash