-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dependabot and auto update deps (#2768)
* Add dependabot * Run update-codegen.sh * Run update
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 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,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
- dependency-name: "k8s.io/*" | ||
- dependency-name: "knative.dev/*" |
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,38 @@ | ||
name: dependabot - hack scripts | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
generate_some_code: | ||
name: update deps | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
path: ./src/github.com/${{ github.repository }} | ||
fetch-depth: 0 | ||
|
||
- name: Run hack scripts | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
run: | ||
./hack/update-deps.sh | ||
./hack/update-codegen.sh | ||
|
||
- name: git push | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
run: | | ||
if ! git diff --exit-code --quiet | ||
then | ||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git add . | ||
git commit -m "Run ./hack/update-codegen.sh" | ||
git push | ||
fi |