Maintenance #203
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: Maintenance | |
on: | |
schedule: | |
- cron: "45 17 * * 0" | |
jobs: | |
go-mod-upgrades: | |
name: Upgrade all Go modules | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.23.1 | |
- name: Upgrade all Go modules | |
run: | | |
go get -u ./... | |
go mod tidy | |
git diff | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/[email protected] | |
with: | |
token: ${{ secrets.GH_REPO_TOKEN }} | |
author: "Łukasz Mierzwa <[email protected]>" | |
commit-message: "chore(backend): upgrade all Go modules" | |
branch: go-mod-upgrades | |
delete-branch: true | |
title: "chore(backend): upgrade all Go modules" | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr merge --merge --auto go-mod-upgrades | |
env: | |
GH_TOKEN: ${{ secrets.GH_REPO_TOKEN }} |