-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #669 from Iceber/verify_forked_code
use a separate action to validate the forked code
- Loading branch information
Showing
3 changed files
with
44 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Verify | ||
on: | ||
push: | ||
paths: | ||
- 'vendor/k8s.io/client-go/tools/cache/reflector.go' | ||
- 'vendor/k8s.io/client-go/tools/pager/pager.go' | ||
jobs: | ||
verify-forked-code: | ||
name: Verify Forked Code | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ${{ env.WORKSPACE }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- run: hack/verify-forked-code.sh |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
reflector=0 | ||
diff vendor/k8s.io/client-go/tools/cache/reflector.go pkg/synchromanager/clustersynchro/informer/cache/.reflector.go || reflector=$? | ||
|
||
if [[ $reflector -eq 0 ]] | ||
then | ||
echo "'reflector.go' is up to date." | ||
else | ||
echo "the file 'reflector.go' in vendor has been changed, please update the 'cache/.reflector.go' and 'reflector.go' in the pkg/synchromanager/clustersynchro/informer" | ||
exit 1 | ||
fi | ||
|
||
pager=0 | ||
diff vendor/k8s.io/client-go/tools/pager/pager.go pkg/synchromanager/clustersynchro/informer/pager/.pager.go.copy || pager=$? | ||
|
||
if [[ $pager -eq 0 ]] | ||
then | ||
echo "'pager.go' is up to date." | ||
else | ||
echo "the file 'pager.go' in vendor has been changed, please update the '.pager.go.copy' and 'pager.go' in the pkg/synchromanager/clustersynchro/informer/pager" | ||
exit 1 | ||
fi |
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