Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "gomod"
directories:
- "/"
- "/integration-tests"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
labels:
- 'dependencies-go'
56 changes: 56 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Update Dependabot PRs
on:
pull_request:
types:
- labeled
- synchronize

permissions: {}
jobs:
gomodstidy:
name: Tidy all Go modules
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'dependencies-go') }}
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Run gomods tidy
run: make gomodtidy
- name: Create commit
id: commit
run: |
if git diff --quiet; then
echo "No changes to commit"
echo "has_changes=false" >> $GITHUB_OUTPUT
else
git config --global user.name "Login will be determined by the Github API based on the creator of the token"
git config --global user.email ""
git commit -am "[dependabot skip] Tidy all Go modules"
echo "has_changes=true" >> $GITHUB_OUTPUT
fi
- name: Setup GitHub Token
if: steps.commit.outputs.has_changes == 'true'
id: setup-github-token
uses: smartcontractkit/.github/actions/setup-github-token@ef78fa97bf3c77de6563db1175422703e9e6674f # setup-github-token@0.2.1
with:
aws-role-arn: ${{ secrets.GATI_AWS_ROLE_APTOS_CICD }}
aws-lambda-url: ${{ secrets.GATI_AWS_LABDA_URL_INTEGRATIONS }}
aws-region: ${{ secrets.GATI_AWS_REGION }}
- name: Push signed commits
if: steps.commit.outputs.has_changes == 'true'
uses: asana/push-signed-commits@d615ca88d8e1a946734c24970d1e7a6c56f34897 # v1
with:
github-token: ${{ steps.setup-github-token.outputs.access-token }}
local_branch_name: ${{ github.head_ref }}
remote_name: "origin"
remote_branch_name: ${{ github.head_ref }}
6 changes: 5 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ move-test: ## Run the Move tests.

.PHONY: move-clean
move-clean: ## Cleans all Move build artifacts
contracts/scripts/clean.sh
contracts/scripts/clean.sh

.PHONY: gomodtidy
gomodtidy: ## Run go mod tidy on all modules.
go run github.com/jmank88/gomods@v0.1.7 tidy
Loading