Update documentation

This commit is contained in:
Peter Evans 2020-07-19 17:04:47 +09:00
parent 809468fcd7
commit 16354377ad
3 changed files with 21 additions and 21 deletions

View file

@ -65,7 +65,7 @@ Note that in order to read the step output the action step must have an id.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
- name: Check outputs - name: Check outputs
run: | run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
@ -104,7 +104,7 @@ If neither `committer` or `author` inputs are supplied the action will look for
The following configuration can be used to have commits authored by the user who triggered the workflow event. The following configuration can be used to have commits authored by the user who triggered the workflow event.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
committer: GitHub <noreply@github.com> committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
@ -129,7 +129,7 @@ As well as relying on the action to handle uncommitted changes, you can addition
- name: Uncommitted change - name: Uncommitted change
run: date +%s > report.txt run: date +%s > report.txt
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
``` ```
### Ignoring files ### Ignoring files
@ -143,7 +143,7 @@ To create a project card for the pull request, pass the `pull-request-number` st
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
- name: Create or Update Project Card - name: Create or Update Project Card
uses: peter-evans/create-or-update-project-card@v1 uses: peter-evans/create-or-update-project-card@v1

View file

@ -159,7 +159,7 @@ Checking out a branch from a different repository from where the workflow is exe
# Make changes to pull request here # Make changes to pull request here
- uses: peter-evans/create-pull-request@v2 - uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
``` ```
@ -185,7 +185,7 @@ How to use SSH (deploy keys) with create-pull-request action:
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
``` ```
### Push pull request branches to a fork ### Push pull request branches to a fork
@ -207,7 +207,7 @@ It will use their own fork to push code and create the pull request.
# Make changes to pull request here # Make changes to pull request here
- uses: peter-evans/create-pull-request@v2 - uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ secrets.MACHINE_USER_PAT }} token: ${{ secrets.MACHINE_USER_PAT }}
push-to-fork: machine-user/fork-of-repository push-to-fork: machine-user/fork-of-repository
@ -248,7 +248,7 @@ GitHub App generated tokens are more secure than using a PAT because GitHub App
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ steps.generate-token.outputs.token }} token: ${{ steps.generate-token.outputs.token }}
``` ```
@ -277,7 +277,7 @@ jobs:
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
``` ```
**Ubuntu container example:** **Ubuntu container example:**
@ -300,7 +300,7 @@ jobs:
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
``` ```
### Creating pull requests on tag push ### Creating pull requests on tag push
@ -332,7 +332,7 @@ jobs:
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
base: master base: master
@ -360,5 +360,5 @@ jobs:
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
``` ```

View file

@ -44,7 +44,7 @@ jobs:
run: | run: |
git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
commit-message: update authors commit-message: update authors
title: Update AUTHORS title: Update AUTHORS
@ -76,7 +76,7 @@ jobs:
git fetch origin master:master git fetch origin master:master
git reset --hard master git reset --hard master
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
branch: production-promotion branch: production-promotion
``` ```
@ -109,7 +109,7 @@ jobs:
npx -p npm-check-updates ncu -u npx -p npm-check-updates ncu -u
npm install npm install
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update dependencies commit-message: Update dependencies
@ -169,7 +169,7 @@ jobs:
- name: Perform dependency resolution and write new lockfiles - name: Perform dependency resolution and write new lockfiles
run: ./gradlew dependencies --write-locks run: ./gradlew dependencies --write-locks
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update dependencies commit-message: Update dependencies
@ -225,7 +225,7 @@ jobs:
# Update current release # Update current release
echo ${{ steps.swagger-ui.outputs.release_tag }} > swagger-ui.version echo ${{ steps.swagger-ui.outputs.release_tag }} > swagger-ui.version
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
commit-message: Update swagger-ui to ${{ steps.swagger-ui.outputs.release_tag }} commit-message: Update swagger-ui to ${{ steps.swagger-ui.outputs.release_tag }}
title: Update SwaggerUI to ${{ steps.swagger-ui.outputs.release_tag }} title: Update SwaggerUI to ${{ steps.swagger-ui.outputs.release_tag }}
@ -267,7 +267,7 @@ jobs:
--domains quotes.toscrape.com \ --domains quotes.toscrape.com \
http://quotes.toscrape.com/ http://quotes.toscrape.com/
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
commit-message: update local website copy commit-message: update local website copy
title: Automated Updates to Local Website Copy title: Automated Updates to Local Website Copy
@ -361,7 +361,7 @@ jobs:
run: echo ::set-output name=branch-name::"autopep8-patches/${{ github.head_ref }}" run: echo ::set-output name=branch-name::"autopep8-patches/${{ github.head_ref }}"
- name: Create Pull Request - name: Create Pull Request
if: steps.autopep8.outputs.exit-code == 2 if: steps.autopep8.outputs.exit-code == 2
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
commit-message: autopep8 action fixes commit-message: autopep8 action fixes
title: Fixes by autopep8 action title: Fixes by autopep8 action
@ -419,7 +419,7 @@ The recommended method is to use [`set-output`](https://help.github.com/en/githu
echo ::set-output name=pr_body::"This PR was auto-generated on $(date +%d-%m-%Y) \ echo ::set-output name=pr_body::"This PR was auto-generated on $(date +%d-%m-%Y) \
by [create-pull-request](https://github.com/peter-evans/create-pull-request)." by [create-pull-request](https://github.com/peter-evans/create-pull-request)."
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
title: ${{ steps.vars.outputs.pr_title }} title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }} body: ${{ steps.vars.outputs.pr_body }}
@ -434,7 +434,7 @@ Alternatively, [`set-env`](https://help.github.com/en/github/automating-your-wor
echo ::set-env name=PULL_REQUEST_BODY::"This PR was auto-generated on $(date +%d-%m-%Y) \ echo ::set-env name=PULL_REQUEST_BODY::"This PR was auto-generated on $(date +%d-%m-%Y) \
by [create-pull-request](https://github.com/peter-evans/create-pull-request)." by [create-pull-request](https://github.com/peter-evans/create-pull-request)."
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v2 uses: peter-evans/create-pull-request@v3
with: with:
title: ${{ env.PULL_REQUEST_TITLE }} title: ${{ env.PULL_REQUEST_TITLE }}
body: ${{ env.PULL_REQUEST_BODY }} body: ${{ env.PULL_REQUEST_BODY }}