setup-dcm installs and sets up DCM for use in GitHub Actions.
name: DCM
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dart and Flutter
uses: subosito/flutter-action@v2
- name: Install dependencies
run: dart pub get
- name: Install DCM
uses: CQLabs/setup-dcm@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run DCM
run: dcm analyze --ci-key="${{ secrets.DCM_CI_KEY }}" --email="${{ secrets.DCM_EMAIL }}" libAlternatively, the last step can be replaced with a dedicated DCM GitHub Action that runs DCM checks:
- name: Run DCM
uses: CQLabs/dcm-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
ci-key: ${{ secrets.DCM_CI_KEY }}
email: ${{ secrets.DCM_EMAIL }}
folders: libThe action takes the following inputs:
github-token: Used to get the latest DCM version from GitHub releases (required).version: Which DCM version to setup:- A specific DCM version (ex.
1.30.0) - or
latest(default) - or
auto(to reuse the version constraint fromdcm_global.yamldescribed here)
- A specific DCM version (ex.
working-directory: The working directory in which to look for thedcm_global.yamlfile.
The action produces the following output:
dcm-version: The version of the DCM executable that was installed.
See the LICENSE file.
Please see our CHANGELOG.md file.