Metrics #27
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Metrics | |
on: | |
schedule: | |
- cron: '0 12 * * 1' | |
workflow_dispatch: | |
jobs: | |
dora: | |
name: DORA Metrics | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Checkout devops-deployment-metrics code | |
uses: actions/checkout@v4 | |
with: | |
repository: flexion/devops-deployment-metrics | |
path: devops-deployment-metrics | |
- name: Install dependencies | |
working-directory: devops-deployment-metrics | |
run: poetry install | |
- name: Set up config file | |
uses: DamianReeves/write-file-action@master | |
with: | |
path: devops-deployment-metrics/config.toml | |
write-mode: overwrite | |
contents: | | |
[general] | |
time-slice-days = 7 | |
start-date = 2022-12-01T00:01:00 | |
date-format = "%Y-%m-%d" | |
[[repositories]] | |
owner = "CDCgov" | |
repo = "trusted-intermediary" | |
id = "42635194" | |
deployment-frequency = "df" | |
change-fail-rate = "cf" | |
mean-time-to-recover = "mttrs" | |
deployment-log = "deployments" | |
- name: Run DORA metrics application | |
working-directory: devops-deployment-metrics | |
env: | |
GITHUB_USERNAME: None | |
GITHUB_TOKEN: ${{ secrets.DORA_METRICS_ACCESS_TOKEN_JOHNNKING }} | |
run: poetry run devops-deployment-metrics -c config.toml | |
- name: Upload output metric files | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dora-metrics | |
path: devops-deployment-metrics/data/*.csv |