Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,47 @@ jobs:
# ...
```

### Outputs

| Output Name | Description |
| ----------- |-----------------------------------------|
| `GHA_UPDATE_PR_NUMBER` | The number of the created pull request. |

#### Example Workflow

```yaml
name: GitHub Actions Version Updater

# Controls when the action will run.
on:
# can be used to run workflow manually
workflow_dispatch:
schedule:
# Automatically run on every Sunday
- cron: '0 0 * * 0'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}

- name: Run GitHub Actions Version Updater
uses: saadmk11/github-actions-version-updater@v0.7.4
# Required to get the PR number
id: gha-update
with:
# [Required] Access token with `workflow` scope.
token: ${{ secrets.WORKFLOW_SECRET }}
skip_pull_request: 'false'
- name: Get PR Number
run: echo "The PR Number is ${{ steps.gha-update.outputs.GHA_UPDATE_PR_NUMBER }}"
```

### Alternative

You can also use [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot) to update your GitHub Actions.
Expand Down
1 change: 1 addition & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def run(self) -> None:
self.user_config.token,
)
if pull_request_number is not None:
gha_utils.set_output("GHA_UPDATE_PR_NUMBER", pull_request_number)
add_pull_request_reviewers(
self.env.repository,
pull_request_number,
Expand Down