Skip to content

Commit 4038462

Browse files
committed
Chore(clean-up): various improvements
- rename inputs (added -location) as these are paths - condensed multiple commands into one step - configure loglevel and output via environment - add step summaries
1 parent a3b859c commit 4038462

File tree

3 files changed

+29
-19
lines changed

3 files changed

+29
-19
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
- run: action-validator ./action.yml
1515

1616
custom-controller-login:
17+
if: ${{ github.actor != 'dependabot[bot]' }}
1718
needs:
1819
- test
1920
runs-on: ubuntu-latest

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Currently supported options:
3030
| add-key | `false` | if set to true, add the ssh key to runway |
3131
| setup-ssh | `false` | if set to true, setup ssh for `runway app deploy` |
3232
| log-level | `error` | debug, info, warn, error |
33-
| public-key | `~/.ssh/id_rsa.pub` | ssh public key location |
34-
| public-key | `~/.ssh/id_rsa` | ssh private key location |
33+
| public-key-location | `~/.ssh/id_rsa.pub` | ssh public key location |
34+
| public-key-location | `~/.ssh/id_rsa` | ssh private key location |
3535
| log-level | `error` | debug, info, warn, error |
3636
| version | `latest` | `runway` cli version |
3737
| controller | `` | controller URL for Enterprise installations |

action.yml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ inputs:
1111
password:
1212
required: true
1313
description: runway password
14-
public-key:
14+
public-key-location:
1515
description: ssh public key location
1616
required: true
1717
default: "~/.ssh/id_rsa.pub"
18-
private-key:
18+
private-key-location:
1919
description: ssh private key location
2020
required: true
2121
default: "~/.ssh/id_rsa"
@@ -40,7 +40,7 @@ inputs:
4040
runs:
4141
using: "composite"
4242
steps:
43-
- name: install runway cli
43+
- name: Install Runway CLI
4444
run: |
4545
curl \
4646
-H 'Cache-Control: no-cache' \
@@ -50,26 +50,35 @@ runs:
5050
shell: bash
5151
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
5252
shell: bash
53-
- run: runway -v -q
54-
shell: bash
55-
- run: echo "RUNWAY_NONINTERACTIVE=true" >> $GITHUB_ENV
56-
shell: bash
57-
- run: runway -l ${{ inputs.log-level }} -q login -u "${{ inputs.username }}" -p "${{ inputs.password }}"
53+
- name: "Configure how Runway behaves"
54+
run: |
55+
echo "RUNWAY_NONINTERACTIVE=true" >> $GITHUB_ENV
56+
echo "RUNWAY_LOGLEVEL=${{ inputs.log-level }}" >> $GITHUB_ENV
57+
echo "RUNWAY_OUTPUT=quiet" >> $GITHUB_ENV
5858
shell: bash
59-
- run: runway -l ${{ inputs.log-level }} -q key create ${{ inputs.public-key }}
59+
- shell: bash
60+
run: |
61+
runway -v
62+
echo "Installed Runway CLI ✅"
63+
- shell: bash
64+
run: |
65+
runway login -u "${{ inputs.username }}" -p "${{ inputs.password }}"
66+
echo "Logged in successfully ✅" >> $GITHUB_STEP_SUMMARY
67+
- run: |
68+
runway key create ${{ inputs.public-key-location }}
69+
echo "Imported a new key ✅" >> $GITHUB_STEP_SUMMARY
6070
if: ${{ inputs.add-key == 'true' }}
6171
shell: bash
62-
- run:
63-
echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV
64-
if: ${{ inputs.setup-ssh == 'true' }}
65-
shell: bash
6672
- run: |
67-
ssh-keyscan -p 2222 deploy.runway.horse >> ~/.ssh/known_hosts
68-
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
69-
ssh-add ${{ inputs.private-key }}
73+
echo "SSH_AUTH_SOCK=/tmp/ssh_agent.sock" >> $GITHUB_ENV
74+
ssh-keyscan -p 2222 deploy.runway.horse >> ~/.ssh/known_hosts
75+
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
76+
ssh-add ${{ inputs.private-key-location }}
7077
if: ${{ inputs.setup-ssh == 'true' }}
7178
shell: bash
7279
- run: echo "RUNWAY_CONTROLLER=${{ inputs.controller-url }}" >> $GITHUB_ENV
7380
if: ${{ inputs.controller-url != '' }}
7481
shell: bash
75-
82+
- shell: bash
83+
run: |
84+
echo "Let's deploy something?! 🚀🤘" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)