Skip to content

Commit f779fcc

Browse files
authored
feat: list uncommitted files for git-dirty-check (wundergraph#2669)
1 parent c7355d0 commit f779fcc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/actions/git-dirty-check/action.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ runs:
1212
- run: git diff --no-ext-diff --exit-code
1313
id: git-dirty-check
1414
shell: bash
15+
- run: |
16+
FILES=$(git diff --name-only --no-ext-diff | sed 's/^/* /')
17+
echo "files<<EOF" >> $GITHUB_OUTPUT
18+
echo "$FILES" >> $GITHUB_OUTPUT
19+
echo "EOF" >> $GITHUB_OUTPUT
20+
id: dirty-files-list
21+
shell: bash
22+
if: failure() && steps.git-dirty-check.outcome == 'failure'
1523
- uses: marocchino/sticky-pull-request-comment@v2
1624
if: failure() && steps.git-dirty-check.outcome == 'failure'
1725
with:
@@ -25,6 +33,15 @@ runs:
2533
* Dependency mismatch for tools (protoc, etc). Ensure your local machine has same versions of tools as CI does
2634
* Formatting drift, fix with `make format ${{ inputs.package-name }}` / `pnpm format ${{ inputs.package-name }}`
2735
36+
---
37+
38+
<details>
39+
<summary>Dirty files</summary>
40+
41+
${{ steps.dirty-files-list.outputs.files }}
42+
43+
</details>
44+
2845
- uses: marocchino/sticky-pull-request-comment@v2
2946
if: success() && steps.git-dirty-check.outcome == 'success'
3047
with:

.github/workflows/dummy-ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
paths:
77
- 'scripts/**'
88
- '.github/workflows/image-release.yml'
9+
- '.github/actions/**'
910
- 'docs-website/**'
1011
jobs:
1112
build_test:

0 commit comments

Comments
 (0)