Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] add a gh action that automatically tidies #21902

Merged
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
43 changes: 43 additions & 0 deletions .github/workflows/tidy-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Project: Tidy"
on:
pull_request:
types: [labeled]
branches:
- main

jobs:
setup-environment:
timeout-minutes: 30
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'dependencies' }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v4
with:
go-version: 1.19
codeboten marked this conversation as resolved.
Show resolved Hide resolved
cache: false
- name: Cache Go
id: go-cache
uses: actions/cache@v3
with:
path: |
~/go/bin
~/go/pkg/mod
key: go-cache-${{ runner.os }}-${{ hashFiles('**/go.sum') }}
- name: Install dependencies
if: steps.go-cache.outputs.cache-hit != 'true'
run: make -j2 gomoddownload
- name: Install Tools
if: steps.go-cache.outputs.cache-hit != 'true'
run: make install-tools
- name: go mod tidy
run: |
make gotidy
git config user.name opentelemetrybot
git config user.email [email protected]
echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy\" && git push)"
git diff --exit-code || (git add . && git commit -m "go mod tidy" && git push)
env:
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"extends": [
"config:base"
],
"schedule": ["every wednesday"],
"schedule": ["every tuesday"],
"ignorePaths": [
"**/receiver/elasticsearchreceiver/testdata/integration/Dockerfile.elasticsearch.7_0_0",
"**/receiver/elasticsearchreceiver/testdata/integration/Dockerfile.elasticsearch.7_16_3",
Expand All @@ -31,7 +31,10 @@
},
{
"matchManagers": ["gomod"],
"enabled": false
"matchUpdateTypes": ["minor", "major"]
}
],
"ignoreDeps": [
"github.com/mattn/go-ieproxy"
]
}