GitHub Actions workflows for automatically versioning and deploying Itential Platform assets. These workflows execute the shared scripts in pipelines/scripts/ to handle version bumping and asset deployment.
Triggers when a pull request from develop is merged into main. It automatically:
- Determines the version bump type by scanning commit messages using Conventional Commits
feat!:orBREAKING CHANGE:→ major bumpfeat:→ minor bump- All other commits → patch bump
- Creates and pushes an annotated release candidate tag (e.g.,
v1.1.0-rc.1)
Triggers on any tag push matching v*. The tag determines the target environment:
| Tag pattern | Example | Target environment |
|---|---|---|
Contains -rc |
v1.1.0-rc.1 |
Staging |
No -rc suffix |
v1.1.0 |
Production |
The workflow runs .github/scripts/deploy.py which connects to the target Itential Platform instance and imports all discovered assets.
- A GitHub repository using this template structure
- Two Itential Platform instances (staging and production) with service account credentials
- A GitHub Personal Access Token (PAT) with permission to push tags
Copy the workflow files from this directory into your repository's .github/workflows/ directory, and copy the shared scripts from pipelines/scripts/ into .github/scripts/:
mkdir -p <path-to-your-repo>/.github/workflows <path-to-your-repo>.github/scripts
cp pipelines/github/*.yml <path-to-your-repo>/.github/workflows/
cp pipelines/scripts/* <path-to-your-repo>/.github/scripts/Note: The workflows reference scripts at
.github/scripts/by default. If you place them elsewhere, update the script paths in each workflow file accordingly.
Create two GitHub environments — staging and production — each with the following secrets and variables:
| Type | Name | Description |
|---|---|---|
| Secret | PLATFORM_HOST |
Itential Platform instance hostname |
| Secret | PLATFORM_CLIENT_ID |
Service account client ID |
| Secret | PLATFORM_CLIENT_SECRET |
Service account client secret |
| Variable | PROJECT_MEMBERS |
JSON array of project members (see below) |
Create a repository-level secret for the auto-rc-tag workflow:
| Type | Name | Description |
|---|---|---|
| Secret | RC_TAG_PAT |
GitHub PAT with permission to push tags |
The PROJECT_MEMBERS variable is a JSON array that controls who gets assigned to imported Studio projects. It supports two member types:
[
{ "type": "account", "username": "user@example.com", "role": "owner" },
{ "type": "group", "name": "network-ops", "role": "operator" }
]- Commit changes to
developusing Conventional Commits (e.g.,feat: add vlan provisioning use case) - Open a PR from
developtomainand merge it - The
auto-rc-tagworkflow creates an RC tag, which triggers deployment to staging
git tag v1.1.0-rc.1
git push origin v1.1.0-rc.1After validating in staging, create a release in GitHub:
- Go to Releases > Draft a new release in your GitHub repository
- Create a new tag using the version number (e.g.,
v1.1.0) — do not include the-rcsuffix - Set the target branch to
main - Add release notes describing the changes
- Click Publish release
Publishing the release pushes the tag, which triggers the production deployment.
export HOST="<platform-hostname>"
export CLIENT_ID="<client-id>"
export CLIENT_SECRET="<client-secret>"
export PROJECT_MEMBERS='[{"type":"account","username":"user@example.com","role":"admin"}]'
pip install git+https://github.com/Itential/asyncplatform.git
python pipelines/scripts/deploy.py <Staging|Production>