Skip to content

feat: shared Action - DX DORA metrics + modify release practices#7

Open
skawaguchi-ecobee wants to merge 16 commits into
mainfrom
dx-dora-metrics
Open

feat: shared Action - DX DORA metrics + modify release practices#7
skawaguchi-ecobee wants to merge 16 commits into
mainfrom
dx-dora-metrics

Conversation

@skawaguchi-ecobee
Copy link
Copy Markdown

@skawaguchi-ecobee skawaguchi-ecobee commented May 22, 2026

Release practices

  • I've enabled a basic release workflow so that people can use versions of these things based on GitHub release tags vs. using latest
  • Added a script to make sure release tags always increment upwards. It still relies on human judgment to catch breaking changes
  • All actions are versioned together. I didn't think it was worth splitting them apart given many of these aren't used

DORA metrics shared action

This shared action is a thin wrapper around the curl command to tell DX when we've deployed something. This is used to get DORA metrics like Deploy Frequency and Lead Time. The action is pretty dumb, it makes it so teams don' t have to worry about timestamps, the DX API key, or sensible defaults. I started with Trunk-Based. If we have other flows, then I might have to make other versions of this. Let's see how far this gets us, and whether it's worth the effort.

Testing Evidence

Tested on iot-control-services repo:
image

...with environment override:
image

Confirmed it's showing up in DX:
image

Now we just have to add to all the repos...

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new GitHub Action, publish_dx_dora_metrics, designed to send deployment data to DX for DORA metrics tracking. It also updates the root README.md to reference versioned actions (@v1) and adds documentation for the new utility. Feedback identifies a high-severity security vulnerability where GitHub Action expressions are expanded directly in a shell script, creating a risk of shell injection; it is recommended to map inputs to environment variables instead. Additionally, the reviewer suggested adding error handling to the curl command and correcting relative links in the root README.md that incorrectly point to a parent directory.

Comment thread publish_dx_dora_metrics/action.yml Outdated
Comment thread README.md Outdated
Comment thread README.md
@skawaguchi-ecobee skawaguchi-ecobee changed the title feat: Shared Action - DX DORA metrics feat: shared Action - DX DORA metrics + modify release practices May 22, 2026
environment:
description: 'Deployment environment (defaults to production)'
required: false
default: 'production'
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what's needed to show up in DORA. I've made it overridable so we can test connections by querying in DX and setting this to like "test" and it won't affect our actual DORA metrics.

commit_sha: $sha,
deployed_at: $ts,
metadata: {
commit_timestamp: $ct
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets us DORA lead time as far as I can tell from the docs

DX_API_TOKEN: ${{ secrets.DX_API_TOKEN }}
with:
repository: 'ecobee/my-service'
service: 'my-service'
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to keep this as simple as possible for teams to use.

# ... your deployment steps ...

- name: Publish deployment metrics
uses: ecobee/github-actions/publish_dx_dora_metrics_trunk_based@v1
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured we need to start having versioning. I'm anticipating creating more shared actions as we go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant