-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3ee7e0
commit 58f7cdc
Showing
2 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |