only run gendocs workflow if there are changes

pull/11827/head
Sharif Elgamal 2021-06-29 17:10:18 -07:00
parent 358856cf99
commit f0cfebce80
1 changed files with 5 additions and 2 deletions

View File

@ -15,10 +15,13 @@ jobs:
with:
go-version: ${{env.GO_VERSION}}
stable: true
- name: gendocs
- name: Generate Docs
id: gendocs
run: |
make generate-docs
echo "::set-output name=changes::$(git status --porcelain)"
- name: Create PR
if: ${{ step.gendocs.outputs.changes != '' }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
@ -30,4 +33,4 @@ jobs:
base: master
delete-branch: true
title: 'Update auto-generated docs and translations'
body: 'Committing changes resulting from `make generate-docs`'
body: 'Committing changes resulting from `make generate-docs`\n\nAutogenerated by the generate-docs github action workflow.\n\n${{ step.gendocs.outputs.changes }}'