Skip to content

Commit

Permalink
add multiple command support
Browse files Browse the repository at this point in the history
  • Loading branch information
LukaGiorgadze committed May 16, 2023
1 parent 941863d commit 3c72b43
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ steps:
with:
username: ${{ secrets.ORY_USERNAME }}
password: ${{ secrets.ORY_PASSWORD }}
command: 'update opl --file ./path/to/file.yaml --project your_ory_project'
command: |
update opl --file ./path/to/file.yaml --project your_ory_project
command 2
command 3
...
```
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.**
Expand Down
18 changes: 16 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ inputs:
password:
description: "ORY password"
required: true
commands:
description: "Newline-separated list of ORY CLI commands to run"
required: true
runs:
using: "composite"
steps:
Expand All @@ -19,7 +22,18 @@ runs:
- 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'
/usr/bin/expect <<EOF
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 }}
- run: |
for command in ${{ inputs.commands }}; do
ory $command
done
shell: bash

0 comments on commit 3c72b43

Please sign in to comment.