The Cloudsmith Developer Hub

Welcome to the Cloudsmith Developer Hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

GitHub Actions

How to integrate GitHub Actions with Cloudsmith

The Cloudsmith GitHub Action allows you to use the Cloudsmith CLI to upload/push packages to Cloudsmith repositories. It currently supports pushing:

  • Debian packages
  • Docker Images
  • Raw files
No Code Uploading

The Cloudsmith CLI gives you full control when connecting to any CI/CD process; allowing you to upload any of our support formats or query your repositories. Just configure your API Key, install the CLI, and you'll be all set.

cloudsmith-github-action
Github Action to push to Cloudsmith

Adding your API Key to GitHub

Retrieve your Cloudsmith API Key.

You will need to add a secret to your GitHub repository named CLOUDSMITH_API_KEY, with the value of your API-Key. Secrets are added through your GitHub repository settings, please see the Creating and Storing Encrypted Secrets documentation on GitHub for further details.

Pass your CLOUDSMITH_API_KEY secret to the Action as per the examples


Examples

Push Debian Package

name: Cloudsmith Push Debian Package
on: push
jobs:
  push:
    runs-on: ubuntu-latest
    name: Debian Push
    steps:
    - uses: actions/[email protected]
    - name: Push
      id: push
      uses: cloudsmith-io/[email protected]
      with:
        api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
        command: 'push'
        format: 'deb'
        owner: 'OWNER'             # Your Cloudsmith account name or org name (namespace) 
        repo: 'REPOSITORY'         # Your Cloudsmith Repository name (slug)
        distro: 'DISTRIBUTION'     # Your Distribution  (i.e Debian, Ubuntu)
        release: 'RELEASE'         # Your Distribution Release (i.e xenial, buster) 
        republish: 'true'          # needed if version is not changing
        file: 'YOUR-FILENAME.deb'  # debian package filename

Push Docker Image

name: Cloudsmith Push Docker Image
on: push
jobs:
  push:
    runs-on: ubuntu-latest
    name: Docker Push
    steps:
    - uses: actions/[email protected]
    - name: Push
      id: push
      uses: cloudsmith-io/[email protected]
      with:
        api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
        command: 'push'
        format: 'docker'
        owner: 'OWNER'             # Your Cloudsmith account name or org name (namespace) 
        repo: 'REPOSITORY'         # Your Cloudsmith Repository name (slug)
        republish: 'true'          # needed if version is not changing
        file: 'IMAGE-FILE.tar.gz'  # docker image filename

Push Raw file

name: Cloudsmith Push Raw File
on: push
jobs:
  push:
    runs-on: ubuntu-latest
    name: Raw Push
    steps:
    - uses: actions/[email protected]
    - name: Push
      id: push
      uses: cloudsmith-io/[email protected]
      with:
        api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
        command: 'push'
        format: 'raw'
        owner: 'OWNER'              # Your Cloudsmith account name or org name (namespace) 
        repo: 'REPOSITORY'          # Your Cloudsmith Repository name (slug)
        file: 'FILENAME.txt'        # Name of file 
        name: 'NAME'                # Name for Raw package
        summary: 'SUMMARY'          # Optional Summary for Raw Package
        description: 'DESCRIPTION'  # Optional description for Raw package
        version: ${{ github.sha }}

Updated 23 days ago


GitHub Actions


How to integrate GitHub Actions with Cloudsmith

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.