-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add auto bump action for e2e test (#888)
* add auto bump for e2e test Signed-off-by: xudong liu <[email protected]>
- Loading branch information
1 parent
3e5386d
commit fec9796
Showing
2 changed files
with
53 additions
and
5 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,48 @@ | ||
name: Bump latest Kubernetes dependecies for e2e test | ||
|
||
on: | ||
schedule: | ||
- cron: '0 12 */2 * *' # Run every two days at UTC noon | ||
|
||
workflow_dispatch: # Use for manaully trigger to debug | ||
|
||
jobs: | ||
bump-to-latest-pre-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: 'test/e2e/go.mod' | ||
|
||
- name: Bump latest k8s.io dependencies | ||
run: | | ||
cd test/e2e | ||
bash ./hack/bump-k8s-dep.sh e2e | ||
cd ../.. | ||
- name: Configure Git | ||
run: | | ||
git config user.name "github-actions[bot]" | ||
git config user.email "[email protected]" | ||
- name: Check for changes and update version | ||
id: changes | ||
run: | | ||
echo "changes=$(git diff)" >> $GITHUB_OUTPUT | ||
- name: Create PR | ||
if: steps.changes.outputs.changes | ||
run: | | ||
HEAD_BRANCH="github-actions/auto-bump/k8s-dependencies-$(date +'%Y%m%d%H%M%S')" | ||
git checkout -b "$HEAD_BRANCH" | ||
git add go.mod go.sum | ||
git commit -sm "Bump kubernetes group dependencies updates for e2e test" | ||
git push origin "$HEAD_BRANCH" | ||
gh pr create --base master --title ":seedling: Bump the kubernetes group updates for e2e test" --body "This is an automatic generated pull request to bump the latest k8s dependencies for e2e test." | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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