Skip to content

Commit

Permalink
docs: update to v5
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-evans committed Apr 4, 2023
1 parent 1f3b0a0 commit b1d967c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions docs/concepts-guidelines.md
Expand Up @@ -88,15 +88,15 @@ In these cases, you *must supply* the `base` input so the action can rebase chan
Workflows triggered by [`pull_request`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request) events will by default check out a merge commit. Set the `base` input as follows to base the new pull request on the current pull request's branch.

```yml
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
base: ${{ github.head_ref }}
```

Workflows triggered by [`release`](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release) events will by default check out a tag. For most use cases, you will need to set the `base` input to the branch name of the tagged commit.

```yml
- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
base: main
```
Expand Down Expand Up @@ -180,7 +180,7 @@ Checking out a branch from a different repository from where the workflow is exe

# Make changes to pull request here

- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
```
Expand All @@ -207,7 +207,7 @@ How to use SSH (deploy keys) with create-pull-request action:
# Make changes to pull request here

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
```

### Push pull request branches to a fork
Expand All @@ -230,7 +230,7 @@ Note that if you choose to use this method (not give the machine account `write`

# Make changes to pull request here

- uses: peter-evans/create-pull-request@v4
- uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.MACHINE_USER_PAT }}
push-to-fork: machine-user/fork-of-repository
Expand Down Expand Up @@ -273,7 +273,7 @@ GitHub App generated tokens are more secure than using a PAT because GitHub App
# Make changes to pull request here

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.generate-token.outputs.token }}
```
Expand Down Expand Up @@ -314,7 +314,7 @@ The action can use GPG to sign commits with a GPG key that you generate yourself
# Make changes to pull request here

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
committer: example <email@example.com>
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
# Make changes to pull request here

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
```

**Ubuntu container example:**
Expand All @@ -367,5 +367,5 @@ jobs:
# Make changes to pull request here

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
```
26 changes: 13 additions & 13 deletions docs/examples.md
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
git log --format='%aN <%aE>%n%cN <%cE>' | sort -u > AUTHORS
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: update authors
title: Update AUTHORS
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
git fetch origin main:main
git reset --hard main
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
branch: production-promotion
```
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
./git-chglog -o CHANGELOG.md
rm git-chglog
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: update changelog
title: Update Changelog
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
npx -p npm-check-updates ncu -u
npm install
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
commit-message: Update dependencies
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
- name: Perform dependency resolution and write new lockfiles
run: ./gradlew dependencies --write-locks
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
commit-message: Update dependencies
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
cargo update
cargo upgrade --to-lockfile
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
commit-message: Update dependencies
Expand Down Expand Up @@ -308,7 +308,7 @@ jobs:
# Update current release
echo ${{ steps.swagger-ui.outputs.release_tag }} > swagger-ui.version
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update swagger-ui to ${{ steps.swagger-ui.outputs.release_tag }}
title: Update SwaggerUI to ${{ steps.swagger-ui.outputs.release_tag }}
Expand Down Expand Up @@ -352,7 +352,7 @@ jobs:
git fetch upstream main:upstream-main
git reset --hard upstream-main
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
branch: upstream-changes
Expand Down Expand Up @@ -385,7 +385,7 @@ jobs:
--domains quotes.toscrape.com \
http://quotes.toscrape.com/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: update local website copy
title: Automated Updates to Local Website Copy
Expand Down Expand Up @@ -482,7 +482,7 @@ jobs:
echo "branch-name=$branch-name" >> $GITHUB_OUTPUT
- name: Create Pull Request
if: steps.autopep8.outputs.exit-code == 2
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
commit-message: autopep8 action fixes
title: Fixes by autopep8 action
Expand Down Expand Up @@ -535,7 +535,7 @@ If you have git hooks that prevent the action from working correctly you can rem
- run: rm -rf .git/hooks
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
```
### Dynamic configuration using variables
Expand All @@ -553,7 +553,7 @@ Note that the step where output variables are defined must have an id.
echo "pr_title=$pr_title" >> $GITHUB_OUTPUT
echo "pr_body=$pr_body" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
title: ${{ steps.vars.outputs.pr_title }}
body: ${{ steps.vars.outputs.pr_body }}
Expand All @@ -579,7 +579,7 @@ The template is rendered using the [render-template](https://github.com/chuhlomi
bar: that
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v5
with:
body: ${{ steps.template.outputs.result }}
```
Expand Down

0 comments on commit b1d967c

Please sign in to comment.