diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5505b72e0d..3ce7dc10b0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,13 +1,48 @@ -version: 2 +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/*" + - package-ecosystem: gomod + directories: + - / + schedule: + interval: weekly + ignore: + - dependency-name: knative.dev/* + - dependency-name: k8s.io/* + update-types: + - version-update:semver-major + - version-update:semver-minor + - dependency-name: github.com/openshift/* + update-types: + - version-update:semver-major + - version-update:semver-minor + - dependency-name: sigs.k8s.io/controller-runtime + update-types: + - version-update:semver-major + - version-update:semver-minor + target-branch: main + commit-message: + prefix: '[main][gomod]' + open-pull-requests-limit: 10 + - package-ecosystem: gomod + directories: + - / + schedule: + interval: weekly + ignore: + - dependency-name: knative.dev/* + - dependency-name: k8s.io/* + update-types: + - version-update:semver-major + - version-update:semver-minor + - dependency-name: github.com/openshift/* + update-types: + - version-update:semver-major + - version-update:semver-minor + - dependency-name: sigs.k8s.io/controller-runtime + update-types: + - version-update:semver-major + - version-update:semver-minor + target-branch: release-1.35 + commit-message: + prefix: '[release-1.35][gomod]' + open-pull-requests-limit: 10 diff --git a/.github/workflows/dependabot-deps.yaml b/.github/workflows/dependabot-deps.yaml index c67051bab2..f0f506d55d 100644 --- a/.github/workflows/dependabot-deps.yaml +++ b/.github/workflows/dependabot-deps.yaml @@ -1,3 +1,4 @@ + name: Dependabot on: @@ -7,7 +8,7 @@ permissions: contents: write jobs: - generate_some_code: + update-deps: name: Update deps runs-on: ubuntu-latest if: ${{ github.actor == 'dependabot[bot]' }} @@ -22,9 +23,13 @@ jobs: - name: Setup Golang uses: openshift-knative/hack/actions/setup-go@main - - name: Run ./hack/update-deps.sh + - name: Install yq + run: | + go install github.com/mikefarah/yq/v3@latest + + - name: Generate files working-directory: ./src/github.com/${{ github.repository }} - run: ./hack/update-deps.sh + run: make generated-files - name: git push working-directory: ./src/github.com/${{ github.repository }} @@ -34,6 +39,6 @@ jobs: 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-deps.sh" + git commit -m "Run generate release" git push fi