Skip to content

bot-75: auth

bot-75: auth #146

Workflow file for this run

name: go-mod-tidy-check
on:
push:
branches: [dev]
pull_request:
branches: [dev, main]
jobs:
go-mod-tidy:
name: tidy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go 1.24
uses: actions/setup-go@v5
with:
go-version: ^1.24.5
- name: Check for 'go mod tidy' changes
run: |
# Запускаем команду, которая может изменить файлы.
go mod tidy
# Проверяем, есть ли изменения в рабочей директории.
if [[ -n $(git status --porcelain go.mod go.sum) ]]; then
echo "::error::go.mod/go.sum are not tidy."
echo "Please run 'go mod tidy' locally and commit the changes."
echo ""
echo "-------------------- git diff output --------------------"
git diff
echo "---------------------------------------------------------"
exit 1
else
echo "go.mod and go.sum are tidy."
fi