scalingo-community / setup-scalingo

A Github Action to install the Scalingo CLI
Mozilla Public License 2.0
4 stars 0 forks source link
github-action scalingo

scalingo-community/setup-scalingo

The scalingo-community/setup-scalingo action is a composite action that sets up Scalingo CLI in your GitHub Actions workflow by:

After you've used the action, subsequent steps in the same job can run arbitrary Scalingo commands using the GitHub Actions run: syntax. This allows most Scalingo commands to work exactly like they do on your local command line

Usage

This action can be run on ubuntu-latest and macos-latest GitHub Actions runners. Note that the region input is always required.

The default configuration installs the latest version of Scalingo CLI:

steps:
- uses: scalingo-community/setup-scalingo@v0.1.1
  with:
    region: 'osc-fr1'

Subsequent steps can launch command with the configured and authenticated CLI (you can create API Token in the Scalingo dashboard):

steps:
- uses: scalingo-community/setup-scalingo@v0.1.1
  with:
    region: 'osc-fr1'
    api_token: ${{ secrets.scalingo_api_token }}
    app_name: 'my_app'

- run: scalingo restart # will restart all the processes of the app "my_app" in region "osc-fr1"

Inputs

The action requires the following inputs:

The action also accepts the following optional inputs:

For testing or debugging purpose, the following inputs can also be used:

Features

Git remote auto-configuration

If the code you provide the region and app_name inputs, the action will automatically configure a Git remote named scalingo to allow git operations on your app. This is useful if you want to run git push scalingo master in your workflow.

steps:
- name: Checkout code
  uses: actions/checkout@v3
- name: Configure Scalingo CLI
  uses: scalingo-community/setup-scalingo@v0.1.1
  with:
    region: 'osc-fr1'
    app_name: 'my_app'
- name: Deploy to Scalingo with Git
  run: git push scalingo main

Custom version of Scalingo CLI

You can install a specific version of Scalingo CLI:

steps:
- uses: scalingo-community/setup-scalingo@v0.1.1
  with:
    region: 'osc-fr1'
    version: 1.28.2