Skip to content

Dependency Bump

Dependency Bump #105

Workflow file for this run

name: Dependency Bump
on:
schedule:
- cron: '1 0 * * 0'
workflow_dispatch:
jobs:
go-get:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.20
- name: Setup git and create branch
env:
GITHUB_TOKEN: ${{ secrets.ADH_BOT_TOKEN }}
run: |
git config --global user.name "adh-bot"
git config --global user.email "[email protected]"
git checkout -b chore/upgrade-dependencies-$(date +%Y-%m-%d)
git push --set-upstream origin chore/upgrade-dependencies-$(date +%Y-%m-%d)
- name: Bump dependencies
run: |
go get -u ./...
go mod tidy
go mod vendor
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.ADH_BOT_TOKEN }}
run: |
# Check if there are changes
if [[ -z $(git status --porcelain) ]]; then
echo "No changes to commit"
exit 0
fi
git add go.mod go.sum
git commit -m "chore(deps): bump dependencies"
git push
gh pr create --title "chore(deps): bump dependencies" --body "Bumps dependencies to latest versions" --base dev --label "dependencies" --reviewer dhawton