Skip to content

Commit

Permalink
genesis
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaGiorgadze committed May 16, 2023
1 parent e3ee7e0 commit 58f7cdc
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# ory-action
ORY CLI GitHub Action
# ORY CLI GitHub Action

This repository hosts a reusable GitHub Action that enables you to run any command with the [ORY CLI](https://www.ory.sh/cli/) within your workflows. The action authenticates with the ORY CLI using the provided username and password, and then executes the specified ORY CLI command. This action is particularly useful for CI/CD pipelines that involve ORY operations.

This action is designed to be flexible and easy to use. Simply provide your ORY username and password, and the ORY CLI command you wish to run. The action will handle the authentication and command execution for you, making it easier than ever to include ORY operations in your GitHub workflows.


## Usage
To use the ORY CLI GitHub Action, you need to include it as a step in your workflow file.

Here's a basic example:


```yaml
steps:
- uses: actions/checkout@v3

- name: Run ORY CLI Command
uses: lomsa-dev/ory-action@v1
with:
username: ${{ secrets.ORY_USERNAME }}
password: ${{ secrets.ORY_PASSWORD }}
command: 'update opl --file ./path/to/file.yaml --project your_ory_project'
```
Replace `${{ secrets.ORY_USERNAME }}` and `${{ secrets.ORY_PASSWORD }}` with your ORY username and password, respectively. **It's highly recommended to store sensitive information like passwords as encrypted secrets in your repository or organization.**

## Contribution
Contributions to improve this GitHub Action are welcome. Please feel free to open an issue or submit a pull request.
21 changes: 21 additions & 0 deletions actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "ORY CLI"
description: "Authenticate and run ORY CLI commands"
inputs:
username:
description: "ORY username"
required: true
password:
description: "ORY password"
required: true
runs:
using: "composite"
steps:
- run: sudo apt-get install -y expect
shell: bash
- run: bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -b . ory && sudo mv ./ory /usr/local/bin/
shell: bash
- run: |
/usr/bin/expect -c 'spawn ory auth; expect "Do you want to sign in to an existing Ory Network account?"; send -- "y\r"; expect "Email:"; send -- "${{ inputs.username }}\r"; expect "Password:"; send -- "${{ inputs.password }}\r"; expect eof'
shell: bash
- run: ory ${{ inputs.command }}
shell: bash

0 comments on commit 58f7cdc

Please sign in to comment.