Integrating 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 supports pushing the next formats:
- Alpine
- Cargo
- CocoaPods
- Composer
- Dart
- Debian
- Docker
- Go
- Helm
- Hex
- Maven
- npm
- NuGet
- Python
- RedHat/RPM
- Raw
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.
OIDC Authentication
When using OIDC with GitHub Actions, save the JWT token to an environment variable called
CLOUDSMITH_API_KEY
and do not includeapi-key
in the.yaml
push action - the API key will be taken from the environment variable instead.
Examples
Examples for all formats supported are available on the GitHub README.