Revert 6155cc25ddaad253abcced4fcd8108d1be98e9c1 #4259
Workflow file for this run
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
name: "Project: Tidy" | |
on: | |
pull_request_target: | |
types: [opened, ready_for_review, synchronize, reopened, labeled, unlabeled] | |
branches: | |
- main | |
jobs: | |
setup-environment: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'renovatebot') }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ~1.20.12 | |
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 107717825+opentelemetrybot@users.noreply.github.com | |
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) | |
- uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
labels: renovatebot |