README: example that prints the number of the opened PR
This commit is contained in:
parent
c58b7816fa
commit
b044cabb79
29
README.md
29
README.md
|
@ -65,6 +65,35 @@ jobs:
|
|||
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
|
||||
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue