ci: update all dependencies for all go mod with dependabot (#13180)
This commit is contained in:
parent
5deb137f7a
commit
9dacaa4a19
54
.github/dependabot.yml
vendored
54
.github/dependabot.yml
vendored
@ -7,99 +7,107 @@ updates:
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: "/docs"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
- package-ecosystem: gomod
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 20
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/simapp"
|
||||
schedule:
|
||||
interval: daily
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/tests"
|
||||
schedule:
|
||||
interval: daily
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/db"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/api"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/orm"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/core"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/cosmovisor"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/depinject"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/errors"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/math"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/client/v2"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/store/tools/ics23"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
- package-ecosystem: gomod
|
||||
directory: "/tx"
|
||||
schedule:
|
||||
interval: weekly
|
||||
labels:
|
||||
- "A:automerge"
|
||||
- dependencies
|
||||
|
||||
37
.github/workflows/dependabot-update-all.yml
vendored
Normal file
37
.github/workflows/dependabot-update-all.yml
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
name: Dependabot Update All Go Modules
|
||||
on: pull_request
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-all:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
# Secret to be added in the repo under Settings > Secrets > Dependabot
|
||||
token: ${{ secrets.PRBOT_PAT }}
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18
|
||||
- name: Extract updated dependency
|
||||
id: deps
|
||||
run: |
|
||||
# Extract the dependency name from the PR title
|
||||
# Example: "build(deps): Bump github.com/cosmos/cosmos-sdk from 0.46.0 to 0.47.0"
|
||||
# Extracts "github.com/cosmos/cosmos-sdk" and "0.47.0"
|
||||
echo "::set-output name=name::$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 3)"
|
||||
echo "::set-output name=version::$(echo "${{ github.event.pull_request.title }}" | cut -d ' ' -f 7)"
|
||||
- name: Update all Go modules
|
||||
run: |
|
||||
./scripts/go-update-dep-all.sh ${{ format('{0}@v{1}', steps.deps.outputs.name, steps.deps.outputs.version) }}
|
||||
./scripts/go-mod-tidy-all.sh
|
||||
- name: Commit changes
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
default_author: github_actions
|
||||
message: "${{ github.event.pull_request.title }} for all modules"
|
||||
6
.github/workflows/fork-cherry-pick.yml
vendored
6
.github/workflows/fork-cherry-pick.yml
vendored
@ -1,6 +1,6 @@
|
||||
# This CI is disabled on main and meant to be enabled on forks as an easy way to cherry pick fork commits into main.
|
||||
# In order to submit a PR to main, you must add the PR_BOT_PAT secret (personal access token) for the GitHub Action.
|
||||
# The PR will be submitted from that user. Note, the PR_BOT_PAT user must have write access to the repo.
|
||||
# In order to submit a PR from your repo to the Cosmos SDK, a PRBOT_PAT secret (personal access token) must be available for the GitHub Action (Settings > Secrets > Actions).
|
||||
# The PR will be submitted from the user of the PAT. Note, the PRBOT_PAT user must have write access to the repo.
|
||||
name: Cherry pick PR to Cosmos SDK
|
||||
on:
|
||||
# Set to trigger on every merge to main, not just a closed PR.
|
||||
@ -34,6 +34,6 @@ jobs:
|
||||
- name: Autocreate PR
|
||||
shell: bash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.PR_BOT_PAT }}
|
||||
GH_TOKEN: ${{ secrets.PRBOT_PAT }}
|
||||
run: |
|
||||
gh pr create --repo cosmos/cosmos-sdk --base main --head "${{ github.event.repository.owner.login }}:pr-patch-${{ github.sha }}" --title "${{ github.event.pull_request.title }}" --body "Automated PR for commit: ${{ github.sha }} from ${{ github.repository }}"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user