Skip to content

chore(deps): update packages #679

chore(deps): update packages

chore(deps): update packages #679

Workflow file for this run

name: tidy
on:
pull_request:
paths:
- ".github/workflows/gosum.yml"
- "go.mod"
- "go.sum"
jobs:
tidy:
name: run go mod tidy and updated
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
- name: reattach HEAD to Head Ref
# b/c checkout action leaves in detached head state https://github.com/actions/checkout/issues/6
run: git checkout "$(echo ${{ github.head_ref }})"
if: github.head_ref != '' && (github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]')
- name: setup go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5
with:
go-version: "1.23.5"
- name: Tidy
run: |
go version
go mod tidy
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
- name: set up Git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
- name: commit and push changes
run: |
git add .
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
git commit -m 'Fix go modules'
git push
fi
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'