Skip to main content
Automate service deployments using GitHub Actions workflows that are automatically generated upon deployment.

Credentials Setup

To enable communication between ale and GitHub, set up authentication credentials.
Go to Developer Settings in your GitHub account, select Personal access tokens from the sidebar, then click Generate new token (classic)
Select both repo and admin:public_key scopes, then click Generate token.
The workflow will stop working when your token expires according to the expiration date you set.
Copy and store the token.
In ale, click Create a New Key in the Auth page of your space settings.
Go to Repository Settings > Secrets and variables > Actions, then click New repository secret.
Add two repository secrets with the following values:
NameSecret
ALE_TOKEN         ale API key
GHP_TOKEN         GitHub Personal Access Token

GitHub Actions Setup

Get Workflow Code

Navigate to the service page and copy the auto-generated GitHub Actions workflow code from the CLI tab.
The endpoint automatically changes depending on the environment where ale is installed.

Create Workflow File

Create a .github/workflows directory in your project’s root and add a yaml file using the code copied from ale.
The .github/workflows folder path is required and fixed, but you can choose any filename for your workflow.

Action Input Parameters

The pre-configured GitHub Actions workflow includes two main actions: the connect action, which configures GitHub repository Deploy Keys for ale’s source access, and the deploy action, which sends deployment settings to ale and triggers the deployment process.
InputDescriptionRequired / Default
tokenale API KeyRequired
ghtokenGitHub Personal TokenRequired
endpointale API EndpointRequired (https://app.[domain]/api)
scopeTarget space nameDefault: API Key user’s space name
repoGitHub repository (format: user/repo)Default: Current action’s repository
readOnly        Generate read-only deploy key if set to ‘true’              Default: false
InputDescriptionRequired / Default
tokenale API KeyRequired
endpointale API EndpointRequired (https://app.[domain]/api)
projectProject name to deployRequired (space/project)
stageDeployment environment nameDefault: Project’s default environment
allStagesDeploy to all environments if ‘true’Default: false
repoGitHub repository (format: user/repo)Default: Current action’s repository
fileDeployment config file locationDefault: .cloudtype/app.yaml
jsonDeployment config JSON text-
yamlDeployment config YAML text-
One of file, json, or yaml inputs must be provided.

Advanced Usage

The generated workflow file can be customized to fit your service needs.
  • Specify the deployment directory with the path field
context:
git:
...
path: /pathname    
By default, services use the resource configuration defined in ale. You can customize resource settings in the resources section of your YAML file
...
yaml: |
  name: springboot-crud-example
  app: java@17
  resources:
    spot: false
    cpu: 1
    memory: 1.5
    replicas: 2
...
The spot field determines the VM type: true for Spot, false for On-demand.
Environment variables can be managed in two ways:
  1. Configure via dashboard (automatically synced to workflow)
  2. Define directly in YAML using the options.env array
...
yaml: |
  name: springboot-crud-example
  app: java@17
  options:
    ports: 8080
    env:
      - name: JAVA_OPTS
        value: -Xms256m -Xmx512m
      - name: SPRING_PROFILES_ACTIVE
        value: dev
...
You can use your registered secret name in ale as the value field to reference secrets in environment variables.
Specify up to three service ports in the options.ports field using comma-separated values.
...
yaml: |
  name: springboot-crud-example
  app: java@17
  options:
    ports: 8080, 8081, 8082
...
I