Skip to content

replace deprecated pflag ParseErrorsWhitelist with ParseErrorsAllowlist #94

replace deprecated pflag ParseErrorsWhitelist with ParseErrorsAllowlist

replace deprecated pflag ParseErrorsWhitelist with ParseErrorsAllowlist #94

name: "Go Housekeeping"
on:
workflow_dispatch:
push:
branches:
- master
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.25.5'
permissions:
contents: read
jobs:
go-housekeeping:
if: github.repository == 'kubernetes/minikube'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{env.GO_VERSION}}
cache: true
- name: Tidy Go Modules
id: gmodtidy
run: make gomodtidy
- name: fmt
id: fmt
run: make fmt
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: goimports in place
id: goimport
run: make imports
- name: Git Changes
id: gitchanges
run: |
c=$(git status --porcelain)
if echo "$c" | grep -qE "go.mod|go.sum"; then
echo "title=build: go mod tidy" >> "$GITHUB_OUTPUT"
else
echo "title=build: gofmt/goimports" >> "$GITHUB_OUTPUT"
fi
# The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
echo "changes<<EOF" >> "$GITHUB_OUTPUT"
echo "$c" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Create PR
if: ${{ steps.gitchanges.outputs.changes != '' }}
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: Update auto-generated docs and translations
committer: minikube-bot <minikube-bot@google.com>
author: minikube-bot <minikube-bot@google.com>
branch: gomodtidy
push-to-fork: minikube-bot/minikube
base: master
delete-branch: true
title: ${{ steps.gitchanges.outputs.title }}
body: |
Committing changes resulting from
- `make gomodtidy`
- `make fmt`
- `make imports`
This PR is auto-generated by the [Go Housekeeping Job](https://github.com/kubernetes/minikube/blob/master/.github/workflows/go-housekeeping.yml) CI workflow that runs on every push to master.
```
${{ steps.gitchanges.outputs.changes }}
```