Skip to content

AmenityDev/coolify-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Coolify Deploy GitHub Action

A GitHub Action to trigger deployments on Coolify via its API.

Features

  • Deploy by resource UUID or tag
  • Automatic pull request detection (uses PR number for PR-specific deployments)
  • Force rebuild option (without cache)
  • Returns deployment UUIDs for tracking

Usage

Basic Usage (Deploy by UUID)

- name: Deploy to Coolify
  uses: AmenityDev/coolify-action@v1
  with:
    coolify_url: https://coolify.example.com
    token: ${{ secrets.COOLIFY_TOKEN }}
    uuid: 'your-resource-uuid'

Deploy by Tag

- name: Deploy to Coolify
  uses: AmenityDev/coolify-action@v1
  with:
    coolify_url: https://coolify.example.com
    token: ${{ secrets.COOLIFY_TOKEN }}
    tag: 'production'

Deploy Multiple Resources

- name: Deploy to Coolify
  uses: AmenityDev/coolify-action@v1
  with:
    coolify_url: https://coolify.example.com
    token: ${{ secrets.COOLIFY_TOKEN }}
    uuid: 'uuid-1,uuid-2,uuid-3'

Force Rebuild (No Cache)

- name: Deploy to Coolify (Force)
  uses: AmenityDev/coolify-action@v1
  with:
    coolify_url: https://coolify.example.com
    token: ${{ secrets.COOLIFY_TOKEN }}
    uuid: 'your-resource-uuid'
    force: 'true'

Pull Request Deployments

When used in a pull_request event, the action automatically includes the PR number in the API request:

name: Deploy PR Preview

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy PR Preview
        uses: AmenityDev/coolify-action@v1
        with:
          coolify_url: https://coolify.example.com
          token: ${{ secrets.COOLIFY_TOKEN }}
          uuid: 'your-resource-uuid'
          # PR number is automatically detected and sent to Coolify

Note: The tag parameter cannot be used with pull request events.

Inputs

Input Description Required Default
coolify_url The base URL of your Coolify instance Yes -
token Coolify API token for authentication Yes -
uuid Resource UUID(s). Comma separated list is also accepted No* -
tag Tag name(s). Comma separated list is also accepted No* -
force Force rebuild without cache No false

* Either uuid or tag must be provided.

Outputs

Output Description
deployments JSON response containing deployment information

Example Output

{
  "deployments": [
    {
      "message": "Deployment started",
      "resource_uuid": "abc123",
      "deployment_uuid": "deploy-xyz"
    }
  ]
}

Setting Up Your Coolify Token

  1. Go to your Coolify instance
  2. Navigate to Keys & TokensAPI Tokens
  3. Create a new token with deploy permission
  4. Add the token to your GitHub repository secrets as COOLIFY_TOKEN

License

MIT

About

A GitHub Action to trigger deployments on Coolify via its API.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors