fix changed files output for github actions

pull/12337/head
Sharif Elgamal 2021-08-23 13:41:53 -07:00
parent 2331f34598
commit d261d4a855
3 changed files with 16 additions and 3 deletions

View File

@ -20,7 +20,10 @@ jobs:
id: gendocs
run: |
make generate-docs
echo "::set-output name=changes::$(git status --porcelain)"
c=$(git status --porcelain)
c="${c//$'\n'/'%0A'}"
c="${c//$'\r'/'%0D'}"
echo "::set-output name=changes::$c"
- name: Create PR
if: ${{ steps.gendocs.outputs.changes != '' }}
uses: peter-evans/create-pull-request@v3
@ -37,6 +40,7 @@ jobs:
body: |
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.
```
${{ steps.gendocs.outputs.changes }}
```

View File

@ -21,7 +21,10 @@ jobs:
id: leaderboard
run: |
make update-leaderboard
echo "::set-output name=changes::$(git status --porcelain)"
c=$(git status --porcelain)
c="${c//$'\n'/'%0A'}"
c="${c//$'\r'/'%0D'}"
echo "::set-output name=changes::$c"
env:
GITHUB_TOKEN: ${{ secrets.MINIKUBE_BOT_PAT }}
- name: Create PR
@ -40,6 +43,7 @@ jobs:
body: |
Committing changes resulting from `make update-leaderboard`.
This PR is auto-generated by the [update-leaderboard](https://github.com/kubernetes/minikube/blob/master/.github/workflows/leaderboard.yml) CI workflow.
```
${{ steps.leaderboard.outputs.changes }}
```

View File

@ -20,7 +20,10 @@ jobs:
id: bumpk8s
run: |
make update-kubernetes-version
echo "::set-output name=changes::$(git status --porcelain)"
c=$(git status --porcelain)
c="${c//$'\n'/'%0A'}"
c="${c//$'\r'/'%0D'}"
echo "::set-output name=changes::$c"
- name: Create PR
if: ${{ steps.bumpk8s.outputs.changes != '' }}
uses: peter-evans/create-pull-request@v3
@ -39,5 +42,7 @@ jobs:
This PR was auto-generated by `make update-kubernetes-version` using [update-k8s-versions.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows) CI Workflow.
Please only merge if all the tests pass.
```
${{ steps.bumpk8s.outputs.changes }}
```