Skip to content

Commit

Permalink
Merge pull request #181 from monochromegane/permissions
Browse files Browse the repository at this point in the history
Update README.
  • Loading branch information
Songmu authored Sep 16, 2024
2 parents f8320f3 + ab51e13 commit a667113
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ on:
jobs:
tagpr:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: Songmu/tagpr@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
To enable pull requests to be created through GitHub Actions, check the "Allow GitHub Actions to create and approve pull requests" box in the "Workflow permissions" section under "Settings > Actions > General" in the repository where you are installing `tagpr`.

If you do not want to use the token provided by GitHub Actions, do the following This is useful if you want to trigger another action with a tag.

ref. <https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow>
Expand All @@ -47,7 +52,7 @@ jobs:
tagpr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_PAT }}
- uses: Songmu/tagpr@v1
Expand Down Expand Up @@ -147,7 +152,7 @@ The tagpr produces output to be used in conjunction with subsequent GitHub Actio
It is useful to see if tag is available and to run tasks after release. The following is an example of running action-update-semver after release.

```yaml
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: tagpr
uses: Songmu/tagpr@v1
env:
Expand Down

0 comments on commit a667113

Please sign in to comment.