Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superfly/flyctl-actions
:octocat: GitHub Action that wraps the flyctl
https://github.com/superfly/flyctl-actions
Last synced: 5 days ago
JSON representation
:octocat: GitHub Action that wraps the flyctl
- Host: GitHub
- URL: https://github.com/superfly/flyctl-actions
- Owner: superfly
- License: apache-2.0
- Created: 2019-09-19T19:55:34.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-09T20:40:22.000Z (about 1 month ago)
- Last Synced: 2024-10-14T20:01:45.828Z (29 days ago)
- Language: TypeScript
- Homepage:
- Size: 72.3 KB
- Stars: 268
- Watchers: 7
- Forks: 35
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Automate Fly.io app deployment
This action wraps the [Fly.io CLI](https://github.com/superfly/flyctl). Use it to deploy or manage your Fly.io application via [Github Actions events](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
## Usage for Deployment>
>
>
>
>
> For production deployments, [pin flyctl to a specific version][pinning] to avoid unexpected behavior in edge releases.[pinning]: #pin-to-a-specific-version-of-flyctl
```yaml
name: Deploy to Fly
on: [push]
jobs:
deploy:
name: Deploy proxy
runs-on: ubuntu-latest
steps:
# This step checks out a copy of your repository.
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
```### Pin to a specific version of `flyctl`:
```yaml
- uses: superfly/flyctl-actions/setup-flyctl@master
with:
version: 0.0.462
```
### Running one-off scripts```yaml
name: Run on Fly
on: [push]
jobs:
deploy:
name: Run script
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: "flyctl ssh console --command 'sh ./myscript.sh'"
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
```See the [flyctl](https://github.com/superfly/flyctl) GitHub project for more information on using `flyctl`.
## Secrets
`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.