Skip to content

Commit

Permalink
Correct permissions for GitHub workflow (#8)
Browse files Browse the repository at this point in the history
The documentation was missing some important bits.

See DeterminateSystems/update-flake-lock#88
  • Loading branch information
sellout committed Oct 22, 2023
2 parents 5a5786c + a103dd5 commit 862ab74
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/settings.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/update-nix-lockfile.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion base/.config/project/github.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,19 @@
};
};
};

actions.permissions.workflow.can_approve_pull_request_reviews = true;
};

workflow."update-nix-lockfile.yml".text = lib.generators.toYAML {} {
name = "Create PR to update Nix flake inputs";
on = {
workflow_dispatch = null;
schedule = [{cron = "0 0 * * 0";}]; # runs weekly on Sunday at 00:00Z
workflow_dispatch = null;
};
permissions = {
contents = "write"; # to make a new branch for the PR
pull-requests = "write"; # to open the PR
};
jobs.lockfile = {
runs-on = "ubuntu-latest";
Expand Down

0 comments on commit 862ab74

Please sign in to comment.