-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
32 additions
and
16 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,19 +21,27 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: "${{ secrets.ACCESS_TOKEN }}" | ||
fetch-depth: 2 | ||
ref: "main" | ||
|
||
- name: Fetch tags for adapter | ||
run: git fetch --tags origin '+refs/tags/adapters/${{ matrix.adapter }}/*:refs/tags/adapters/${{ matrix.adapter }}/*' | ||
|
||
- name: Files modified | ||
id: check | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
./internal/** | ||
./*.go | ||
./go.mod | ||
./go.sum | ||
run: | | ||
any_changed="false" | ||
if git diff --name-only HEAD^ | grep -q "^internal/"; then | ||
any_changed="true" | ||
fi | ||
# check if any go file in root folder change | ||
if git diff --name-only HEAD^ | grep -E "^([a-z0-9_]+\.go)$|^(go\.(mod|sum))$"; then | ||
any_changed="true" | ||
fi | ||
echo "any_changed=$any_changed" >> $GITHUB_OUTPUT | ||
- name: Config Git User | ||
if: steps.check.outputs.any_changed == 'true' | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,16 +26,22 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: "${{ secrets.ACCESS_TOKEN }}" | ||
fetch-depth: 2 | ||
ref: "main" | ||
|
||
- name: Fetch tags for adapter | ||
run: git fetch --tags origin '+refs/tags/adapters/${{ matrix.adapter }}/*:refs/tags/adapters/${{ matrix.adapter }}/*' | ||
|
||
- name: Files modified | ||
id: check | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
./${{ matrix.module }}/** | ||
run: | | ||
any_changed="false" | ||
if git diff --name-only HEAD^ | grep -q "^${{ matrix.module }}/"; then | ||
any_changed="true" | ||
fi | ||
echo "any_changed=$any_changed" >> $GITHUB_OUTPUT | ||
- name: Config Git User | ||
if: steps.check.outputs.any_changed == 'true' | ||
|
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
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