mirror of
https://github.com/Alexander-D-Karpov/about.git
synced 2026-03-16 22:06:08 +03:00
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: Dependency Update
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 2 * * 1' # Weekly on Monday at 2 AM UTC
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
update-dependencies:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: 1.22
|
|
|
|
- name: Update Go dependencies
|
|
run: |
|
|
go get -u ./...
|
|
go mod tidy
|
|
|
|
- name: Run tests with updated dependencies
|
|
run: go test ./...
|
|
|
|
- name: Check for changes
|
|
id: changes
|
|
run: |
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
echo "changes=true" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "changes=false" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create Pull Request
|
|
if: steps.changes.outputs.changes == 'true'
|
|
uses: peter-evans/create-pull-request@v5
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: 'chore: update Go dependencies'
|
|
title: 'chore: update Go dependencies'
|
|
body: |
|
|
Automated update of Go dependencies.
|
|
|
|
Changes:
|
|
- Updated all Go modules to latest versions
|
|
- Ran `go mod tidy` to clean up go.mod and go.sum
|
|
- Verified tests still pass with updated dependencies
|
|
|
|
Please review the changes and merge if everything looks good.
|
|
branch: chore/update-dependencies
|
|
delete-branch: true
|