If you want to manage your semantic model code with Git and automatically publish to Credible when changes are merged, you can set up a CI/CD pipeline using our GitHub Actions template.
How It Works
When you push changes to your main branch:
- Detect - Pipeline identifies which packages changed
- Version - Automatically bumps the patch version in
publisher.json
- Publish - Deploys packages to your Credible project
Prerequisites
- A GitHub repository for your packages
- Admin access to the repository
- A Credible organization and project
Setup
Step 1: Create Repository from Template
- Go to the CI/CD template repository
- Click “Use this template” → “Create a new repository”
- Choose your organization and enter a repository name
The template includes all necessary scripts and GitHub Actions workflows.
The CI/CD bot needs a GitHub App to commit version bumps back to your repository.
Create the App:
- Go to your GitHub organization: Settings → Developer settings → GitHub Apps → New GitHub App
- Configure:
- Name:
credible-cicd-bot
- Webhook: Uncheck “Active”
- Repository permissions: Contents (Read/Write), Pull requests (Read/Write), Metadata (Read)
- Installation: “Only on this account”
- Click Create GitHub App
- Note the App ID at the top of the page
- Scroll to Private keys → Generate a private key (save the
.pem file)
- Go to Install App → Install on your repository
Go to your repository: Settings → Secrets and variables → Actions → New repository secret
| Secret | Value |
|---|
CICD_BOT_APP_ID | Your GitHub App ID |
CICD_BOT_APP_PRIVATE_KEY | Contents of the .pem file |
JWT_ACCESS_TOKEN | Credible API token (see note below) |
Generate a Credible API token using the CLI: cred add group-access-token. See CLI documentation for details.
The group used to generate the token needs Modeler access to your project:
Go to: Settings → Secrets and variables → Actions → Variables
| Variable | Value |
|---|
CRED_ORG | Your Credible organization name |
CRED_PROJECT | Your Credible project name |
SET_LATEST | true or false (optional, defaults to true) |
- Go to Settings → Branches → Add branch protection rule
- Branch name pattern:
main
- Enable:
- Allow specified actors to bypass required pull requests → Add
credible-cicd-bot
- Require status checks to pass before merging
- Restrict who can push to matching branches → Add
credible-cicd-bot
Repository Structure
Your repository should follow this structure:
your-repo/
├── .github/workflows/ # CI/CD workflows (from template)
├── packages/
│ ├── package-one/
│ │ ├── publisher.json
│ │ └── [your .malloy files]
│ └── package-two/
│ └── ...
└── scripts/ # CI/CD scripts (from template)
Each package needs a publisher.json:
{
"name": "your-package-name",
"version": "0.0.0",
"description": "Package description"
}
Merge Strategy
Do not use “Squash and merge” for pull requests that modify packages. Squashing can cause the pipeline to miss package changes. Use Merge commit or Rebase and merge instead.
Support
If you encounter issues, check the workflow logs in the GitHub Actions tab. For additional help, contact us with workflow run IDs and error messages.