minikube/.github/workflows/docs.yml

52 lines
1.8 KiB
YAML
Raw Normal View History

2021-06-16 17:06:28 +00:00
name: "generate-docs"
on:
workflow_dispatch:
2021-06-17 19:08:50 +00:00
push:
2021-06-17 20:51:37 +00:00
branches:
2023-03-16 21:14:27 +00:00
- master
2021-06-23 16:38:59 +00:00
env:
GOPROXY: https://proxy.golang.org
2023-11-14 17:08:00 +00:00
GO_VERSION: '1.21.4'
permissions:
contents: read
2021-06-16 17:06:28 +00:00
jobs:
generate-docs:
2022-06-09 17:11:22 +00:00
if: github.repository == 'kubernetes/minikube'
2021-09-28 03:01:27 +00:00
runs-on: ubuntu-20.04
2021-06-16 17:06:28 +00:00
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe
2021-06-17 19:19:32 +00:00
with:
2021-06-23 16:38:59 +00:00
go-version: ${{env.GO_VERSION}}
cache-dependency-path: ./go.sum
- name: Generate Docs
id: gendocs
2021-06-16 17:06:28 +00:00
run: |
2021-06-29 20:34:04 +00:00
make generate-docs
c=$(git status --porcelain)
# 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
2022-11-04 23:20:08 +00:00
echo "changes<<EOF" >> $GITHUB_OUTPUT
echo "$c" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
2021-06-29 20:34:04 +00:00
- name: Create PR
2021-06-30 00:42:30 +00:00
if: ${{ steps.gendocs.outputs.changes != '' }}
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38
2021-06-29 20:34:04 +00:00
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: gendocs
2021-06-29 20:52:45 +00:00
push-to-fork: minikube-bot/minikube
2021-06-29 20:41:23 +00:00
base: master
2021-06-29 20:34:04 +00:00
delete-branch: true
title: 'Update auto-generated docs and translations'
2021-07-01 19:41:09 +00:00
body: |
2021-07-01 19:55:01 +00:00
Committing changes resulting from `make generate-docs`.
This PR is auto-generated by the [gendocs](https://github.com/kubernetes/minikube/blob/master/.github/workflows/docs.yml) CI workflow.
2021-07-01 19:41:09 +00:00
```
${{ steps.gendocs.outputs.changes }}
```