Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
2026a4bf1a | |||
80619aa2cd | |||
357625ea1a | |||
86dd511c79 | |||
259c65e7d4 | |||
03e1d864c6 |
30
README.md
30
README.md
@ -94,6 +94,36 @@ jobs:
|
|||||||
run: echo Pull request number is ${{ steps.update.outputs.pull-request-number }}.
|
run: echo Pull request number is ${{ steps.update.outputs.pull-request-number }}.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Example that doesn't run on PRs
|
||||||
|
|
||||||
|
If you were to run this action as a part of your CI workflow, you may want to prevent it from running against Pull Requests.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: update-flake-lock
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # allows manual triggering
|
||||||
|
pull_request: # triggers on every Pull Request
|
||||||
|
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
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
uses: DeterminateSystems/update-flake-lock@vX
|
||||||
|
with:
|
||||||
|
inputs: input1 input2 input3
|
||||||
|
```
|
||||||
|
|
||||||
## 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.
|
||||||
|
@ -13,6 +13,10 @@ inputs:
|
|||||||
description: 'The message provided with the commit'
|
description: 'The message provided with the commit'
|
||||||
required: false
|
required: false
|
||||||
default: "flake.lock: Update"
|
default: "flake.lock: Update"
|
||||||
|
branch:
|
||||||
|
description: 'The branch of the PR to be created'
|
||||||
|
required: false
|
||||||
|
default: "update_flake_lock_action"
|
||||||
pr-title:
|
pr-title:
|
||||||
description: 'The title of the PR to be created'
|
description: 'The title of the PR to be created'
|
||||||
required: false
|
required: false
|
||||||
@ -49,7 +53,7 @@ runs:
|
|||||||
id: create-pr
|
id: create-pr
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
branch: update_flake_lock_action
|
branch: ${{ inputs.branch }}
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
title: ${{ inputs.pr-title }}
|
title: ${{ inputs.pr-title }}
|
||||||
token: ${{ inputs.token }}
|
token: ${{ inputs.token }}
|
||||||
|
8
flake.lock
generated
8
flake.lock
generated
@ -2,16 +2,16 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1638263381,
|
"lastModified": 1654682581,
|
||||||
"narHash": "sha256-1rZDxTw74ETuJEjwPfpMgY0sfx8Cv1tRNt3gibol574=",
|
"narHash": "sha256-Jb1PQCwKgwdNAp907eR5zPzuxV+kRroA3UIxUxCMJ9s=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7b031d0d99e8cdaf0b70457c0cb33f16c0c958bb",
|
"rev": "e0169d7a9d324afebf5679551407756c77af8930",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable-small",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user