Manage data models in CI/CD
Beta
The features described in this section are currently in beta testing and are subject to change.
This article describes how to use the Cognite Data Fusion (CDF) CLI to manage a data model in a CI/CD pipeline with GitHub actions.
Prerequisites
Before you start, make sure you have completed these steps:
- Install the CDF CLI on your machine.
- Created your data model.
Step 1: Create a GitHub Action
-
Create a GitHub Action to run every time you merge to the
main
branch..github/workflows/publish-dm-on-main.ymlname: Publish datamodel on merge to main
on:
push:
branches:
- main
jobs:
publish-dm:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
# We will add the next steps here
Step 2: Install the CDF CLI
-
Add commands to install the CDF CLI in the GitHub Action.
- name: Install
run: |
npm install --global @cognite/cdf-cli