chore(deps): update codecov/codecov-action action to v5 #3
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: go-mod-tidy | |
on: | |
pull_request_target: | |
types: [opened, ready_for_review, synchronize, reopened, labeled, unlabeled] | |
branches: | |
- main | |
jobs: | |
setup-environment: | |
runs-on: ubuntu-latest | |
if: ${{ (github.actor == 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'renovatebot')) }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup Go | |
uses: actions/[email protected] | |
with: | |
go-version: "1.22" | |
- name: Setup Go Environment | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Cache Go | |
id: module-cache | |
uses: actions/cache@v4 | |
with: | |
path: /home/runner/go/pkg/mod | |
key: go-pkg-mod-${{ runner.os }}-${{ hashFiles('**/go.mod', '**/go.sum') }} | |
- name: Install dependencies | |
if: steps.module-cache.outputs.cache-hit != 'true' | |
run: make gomoddownload | |
- name: Install Tools | |
if: steps.module-cache.outputs.cache-hit != 'true' | |
run: make install-tools | |
- name: go mod tidy, make all | |
run: | | |
make tidy && make all | |
git config user.name opentelemetrybot | |
git config user.email [email protected] | |
echo "git diff --exit-code || (git add . && git commit -m \"go mod tidy, make all\" && git push)" | |
git diff --exit-code || (git add . && git commit -m "go mod tidy, make all" && git push) | |
env: | |
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }} | |
- uses: actions-ecosystem/action-remove-labels@v1 | |
with: | |
labels: renovatebot |