Skip to content

Commit 6b0eda4

Browse files
lucia-sbclaude
andauthored
Make CI action bumps easier to validate (DataDog#23890)
* Run release-hash-check on its own workflow changes Add the workflow file to the pull_request paths filter so action-version bumps (e.g. Renovate updates to tj-actions/changed-files) are exercised on the PR that introduces them. Guard the hash-check script on any_changed so a workflow-only change still runs the action but doesn't fail with no link file to validate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Remove redundant comments Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Add dry-run mode to skip the test-results badge commit Add a dry_run input to test-results-master.yml that runs the badge step but skips committing to the badges branch, and expose it as a workflow_dispatch input on flaky-tests.yml. This lets action bumps (e.g. Renovate updates to emibcn/badge-action) be validated on demand without moving the public badge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Trim dry_run input descriptions Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(ci): run flaky-tests workflow on test-results-master.yml changes - Add pull_request trigger scoped to .github/workflows/test-results-master.yml - Auto-enable dry_run when triggered by pull request to avoid committing during validation Rationale: Allows self-validation of the workflow when test-results-master.yml is modified, mirroring the pattern already used for release-hash-check This commit made by [/dd:git:commit:quick](https://github.com/DataDog/claude-marketplace/tree/main/dd/commands/git/commit/quick.md) --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9311b89 commit 6b0eda4

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/flaky-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
name: Daily Flaky Tests (every 8 hours)
22

33
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/test-results-master.yml
47
workflow_dispatch:
8+
inputs:
9+
dry_run:
10+
description: "Skip committing the test-results badge."
11+
required: false
12+
default: false
13+
type: boolean
514
schedule:
615
# 4 AM, 12 PM, 8 PM UTC
716
- cron: "0 4,12,20 * * *"
@@ -46,4 +55,6 @@ jobs:
4655
pull-requests: write # Needed for test-results-master
4756

4857
uses: ./.github/workflows/test-results-master.yml
58+
with:
59+
dry_run: ${{ github.event_name == 'pull_request' || inputs.dry_run || false }}
4960
secrets: inherit

.github/workflows/release-hash-check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- '7.[0-9]+.x'
88
paths:
99
- .in-toto/*.link
10+
- .github/workflows/release-hash-check.yml
1011

1112
jobs:
1213
build:
@@ -29,4 +30,5 @@ jobs:
2930
with:
3031
files: .in-toto/*.link
3132

32-
- run: python .github/workflows/release-hash-check.py ${{ steps.changed-files.outputs.all_changed_files }}
33+
- if: steps.changed-files.outputs.any_changed == 'true'
34+
run: python .github/workflows/release-hash-check.py ${{ steps.changed-files.outputs.all_changed_files }}

.github/workflows/test-results-master.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Test results for the master branch
22

33
on:
44
workflow_call:
5+
inputs:
6+
dry_run:
7+
description: "Run the badge step but skip committing to the badges branch."
8+
required: false
9+
default: false
10+
type: boolean
511

612
defaults:
713
run:
@@ -66,6 +72,7 @@ jobs:
6672
git config --local user.email "github-actions[bot]@users.noreply.github.com"
6773
6874
- name: Commit if stats have changed
75+
if: ${{ !inputs.dry_run }}
6976
run: |-
7077
git add "${{ env.BADGE_PATH }}"
7178
if git commit -m "Update test results from ${{ github.sha }}"; then

0 commit comments

Comments
 (0)