{"id":19764478,"url":"https://github.com/hostwithquantum/setup-runway","last_synced_at":"2025-04-30T14:33:04.386Z","repository":{"id":65160103,"uuid":"569431225","full_name":"hostwithquantum/setup-runway","owner":"hostwithquantum","description":"A GitHub action to deploy to runway!","archived":false,"fork":false,"pushed_at":"2024-02-21T12:58:04.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-31T10:46:17.846Z","etag":null,"topics":["github","github-action","github-actions","planetary-quantum","runway"],"latest_commit_sha":null,"homepage":"https://www.runway.horse/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hostwithquantum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-11-22T20:12:58.000Z","updated_at":"2024-10-14T14:19:33.000Z","dependencies_parsed_at":"2024-02-21T13:58:53.281Z","dependency_job_id":null,"html_url":"https://github.com/hostwithquantum/setup-runway","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fsetup-runway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fsetup-runway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fsetup-runway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fsetup-runway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hostwithquantum","download_url":"https://codeload.github.com/hostwithquantum/setup-runway/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224214016,"owners_count":17274524,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-action","github-actions","planetary-quantum","runway"],"created_at":"2024-11-12T04:13:57.584Z","updated_at":"2024-11-12T04:13:58.208Z","avatar_url":"https://github.com/hostwithquantum.png","language":null,"readme":"# hostwithquantum/setup-runway\n\n![hostwithquantum/setup-runway](setup-runway-banner.jpeg)\n\nA GitHub action to setup the runway CLI! Questions, issues? Please use discussions or the issue tracker on the repository. If you like what you see here, **we appreciate a** :star: and if you'd subscribe to [(our monthly) mailing list](https://runway.planetary-quantum.com/) to stay in the loop!\n\n## Quick Start\n\n```yaml\n# ...\nsteps:\n- uses: actions/checkout@v4\n  with:\n    fetch-depth: 0\n- uses: hostwithquantum/setup-runway@v0.3.0\n  with:\n    username: ${{ secrets.RUNWAY_USERNAME }}\n    password: ${{ secrets.RUNWAY_PASSWORD }}\n- run: runway whoami\n```\n\n## Options\n\nCurrently supported options:\n\n| option        | default value       | description                                       |\n|---------------|---------------------|---------------------------------------------------|\n| username      | `\u003cnone\u003e`            | username/email for runway                         |\n| password      | `\u003cnone\u003e`            | password for runway                               |\n| add-key       | `false`             | if set to true, add the ssh key to runway         |\n| setup-ssh     | `false`             | if set to true, setup ssh for `runway app deploy` |\n| log-level     | `error`             | debug, info, warn, error                          |\n| public-key    | `~/.ssh/id_rsa.pub` | ssh public key location                           |\n| public-key    | `~/.ssh/id_rsa`     | ssh private key location                          |\n| log-level     | `error`             | debug, info, warn, error                          |\n| version       | `latest`            | `runway` cli version                              |\n| controller    | ``                  | controller URL for Enterprise installations       |\n\n\u003e For the version, `latest` is fine. We strive to never break your workflows. But sometimes BC breaks are necessary. Because they usually involve our client and APIs, using `latest` helps to keep all interruptions to a minimum.\n\n## Examples\n\n### Setup the runway CLI to deploy\n\nThis is an example workflow which shows runway CLI setup and then how to use the CLI to deploy your app `cool-app`.\n\nOnce the client is setup, you can run all commands and play around with output and so on. To keep it simple, we're only deploying the code. :) Since the app exists already on runway we use the `runway gitremote` command to initialize the setup.\n\n```yaml\n# .github/workflows/release.yml\n---\nname: release\n\non:\n  push:\n    tags:\n\njobs:\n  deploy:\n    runs-on: ubuntu-latest\n    env:\n      YOUR_APPLICATION_NAME: cool-app\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        fetch-depth: 0\n    - name: create public/private key on GHA\n      run: |\n        mkdir -p ~/.ssh/\n        echo \"${{ secrets.PRIVATE_KEY }}\" \u003e ~/.ssh/id_rsa\n        echo \"${{ secrets.PUBLIC_KEY }}\" \u003e ~/.ssh/id_rsa.pub\n        chmod 0600 ~/.ssh/id_rsa*\n    - uses: hostwithquantum/setup-runway@v0.3.0\n      with:\n        username: ${{ secrets.RUNWAY_USERNAME }}\n        password: ${{ secrets.RUNWAY_PASSWORD }}\n        setup-ssh: true\n    - run: runway gitremote -a ${YOUR_APPLICATION_NAME}\n    - run: runway app deploy\n```\n\n### Running e2e tests\n\nGitHub Actions provides a robust and comprehensive environment to run e2e tests and here's how runway can help:\n\nThe following workflow leverages some of the context in form of `${{ github.run_id }}`. We'll use this _identifier_ to deploy an app with a unique name. Another viable option is to use the pull-requests's number: `${{ github.event.number }}`.\n\nOnce deployed, you can run end-to-end tests against it and in the end, shut it down by deleting the app (and key). :) If you decide to keep the application to have a preview available, you may also do that.\n\n```yaml\n# .github/workflows/e2e.yml\n---\nname: e2e\n\non: \n  pull_request:\n\njobs:\n  deploy_app:\n    runs-on: ubuntu-latest\n    timeout-minutes: 15\n    steps:\n    - uses: actions/checkout@v4\n      with:\n        fetch-depth: 0 # this is important!\n    - name: create the application name\n      run: echo \"APP_NAME=my-app-${{ github.run_id }}\" \u003e\u003e $GITHUB_ENV\n    - name: create an ssh key just for this run\n      run: |\n        mkdir -p ~/.ssh/\n        ssh-keygen -b 2048 -t rsa -f ~/.ssh/test-runner -c \"test-key-${{ github.run_id }}\" -q -N \"\"\n    - name: install CLI, login and add ssh key\n      uses: hostwithquantum/setup-runway@v0.3.0\n      with:\n        username: ${{ secrets.RUNWAY_USERNAME }}\n        password: ${{ secrets.RUNWAY_PASSWORD }}\n        public-key: ~/.ssh/test-runner.pub\n        private-key: ~/.ssh/test-runner\n        add-key: true\n        setup-ssh: true\n    - name: create app on runway\n      run: runway app create -a $APP_NAME || runway gitremote -a $APP_NAME\n    - name: deploy your app to runway\n      run: runway app deploy\n    # this is where your tests run!\n    - name: run your e2e tests here\n      run: curl https://$APP_NAME.pqapp.dev/\n    # then hopefully you are done :)\n    - name: cleanup app\n      if: always()\n      run : runway app rm -a $APP_NAME || true\n    - name: cleanup key - this is brute force\n      if: always()\n      run: runway key rm \"test-key-${{ github.run_id }}\" || true\n```\n\n### Preview apps\n\nIn the previous example, we mentioned that keeping an app for people (humans!) to look at it, may be beneficial.\n\nThe following workflow expands on those concepts and deletes an application from runway when a pull-request is closed (merged or closed without merge). This example _assumes_ that you constructed the application name like, `my-app-${{ github.event.number }}` (instead of `github.run_id`).\n\n```yaml\nname: delete app\n\non:\n  pull_request:\n    types:\n    - closed\n\njobs:\n  delete:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: hostwithquantum/setup-runway@v0.3.0\n      with:\n        username: ${{ secrets.QUANTUM_RUNWAY_USERNAME }}\n        password: ${{ secrets.QUANTUM_RUNWAY_PASSWORD }}\n    - run: runway app delete my-app-${{ github.event.number }} || true\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhostwithquantum%2Fsetup-runway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhostwithquantum%2Fsetup-runway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhostwithquantum%2Fsetup-runway/lists"}