Skip to content

Commit 58f7cdc

Browse files
committed
genesis
1 parent e3ee7e0 commit 58f7cdc

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,29 @@
1-
# ory-action
2-
ORY CLI GitHub Action
1+
# ORY CLI GitHub Action
2+
3+
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.
4+
5+
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.
6+
7+
8+
## Usage
9+
To use the ORY CLI GitHub Action, you need to include it as a step in your workflow file.
10+
11+
Here's a basic example:
12+
13+
14+
```yaml
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Run ORY CLI Command
19+
uses: lomsa-dev/ory-action@v1
20+
with:
21+
username: ${{ secrets.ORY_USERNAME }}
22+
password: ${{ secrets.ORY_PASSWORD }}
23+
command: 'update opl --file ./path/to/file.yaml --project your_ory_project'
24+
```
25+
26+
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.**
27+
28+
## Contribution
29+
Contributions to improve this GitHub Action are welcome. Please feel free to open an issue or submit a pull request.

actions.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "ORY CLI"
2+
description: "Authenticate and run ORY CLI commands"
3+
inputs:
4+
username:
5+
description: "ORY username"
6+
required: true
7+
password:
8+
description: "ORY password"
9+
required: true
10+
runs:
11+
using: "composite"
12+
steps:
13+
- run: sudo apt-get install -y expect
14+
shell: bash
15+
- run: bash <(curl https://raw.githubusercontent.com/ory/meta/master/install.sh) -b . ory && sudo mv ./ory /usr/local/bin/
16+
shell: bash
17+
- run: |
18+
/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'
19+
shell: bash
20+
- run: ory ${{ inputs.command }}
21+
shell: bash

0 commit comments

Comments
 (0)