From 67ddda2a87628f1aff28a54b8a708879ec62c80f Mon Sep 17 00:00:00 2001 From: Joshua Sierles Date: Sat, 26 Mar 2022 20:53:06 +0100 Subject: [PATCH] Update docs to prefer the setup-flyctl action --- README.md | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 86d9de8..8948a33 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,7 @@ # GitHub Actions for flyctl -This action wraps the flyctl CLI tool to allow deploying and managing fly apps. - -## Usage - -### Deploy +This action wraps the flyctl CLI tool to allow deploying and managing fly apps. We recommend using the `setup-flyctl` action which runs outside of Docker for speed and flexibility. +## Usage for deployment ```yaml name: Deploy to Fly @@ -16,15 +13,20 @@ jobs: steps: # This step checks out a copy of your repository. - uses: actions/checkout@v2 - - uses: superfly/flyctl-actions@master + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy --remote-only env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} - with: - args: "deploy" ``` +To use a specific version of `flyctl`: -### Run one off scripts +```yaml +- uses: superfly/flyctl-actions/setup-flyctl@master + with: + version: 0.0.308 +``` +### Run one-off scripts ```yaml name: Run on Fly @@ -35,11 +37,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: superfly/flyctl-actions@master + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: "flyctl ssh console --command 'sh ./myscript.sh'" env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} - with: - args: "ssh console --command 'sh ./myscript.sh'" ``` See the [flyctl](https://github.com/superfly/flyctl) GitHub project for more information on using `flyctl`. @@ -48,3 +49,6 @@ See the [flyctl](https://github.com/superfly/flyctl) GitHub project for more inf `FLY_API_TOKEN` - **Required**. The token to use for authentication. You can find a token by running `flyctl auth token` or going to your [user settings on fly.io](https://fly.io/user/personal_access_tokens). +## Using the `setup-flyctl` action + +This documentation only covers usage of the `setup-flyctl` action. The main action in this repository runs more slowly inside Docker, so is not recommended. It's been kept in place since many CI pipelines are still using it.