README: example that prints the number of the opened PR

This commit is contained in:
Cole Helbling 2022-04-21 12:03:25 -07:00 committed by Cole Helbling
parent c58b7816fa
commit b044cabb79
1 changed files with 29 additions and 0 deletions

View File

@ -65,6 +65,35 @@ jobs:
inputs: input1 input2 input3 inputs: input1 input2 input3
``` ```
## Example that prints the number of the created PR
```yaml
name: update-flake-lock
on:
workflow_dispatch: # allows manual triggering
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
jobs:
lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v16
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Update flake.lock
id: update
uses: DeterminateSystems/update-flake-lock@vX
with:
inputs: input1 input2 input3
- name: Print PR number
run: echo Pull request number is ${{ steps.update.outputs.pull-request-number }}.
```
## Running GitHub Actions CI ## Running GitHub Actions CI
GitHub Actions will not run workflows when a branch is pushed by or a PR is opened by a GitHub Action. There are two ways to have GitHub Actions CI run on a PR submitted by this action. GitHub Actions will not run workflows when a branch is pushed by or a PR is opened by a GitHub Action. There are two ways to have GitHub Actions CI run on a PR submitted by this action.