Closed piotrkwiecinski closed 1 year ago
@akirak would could you have a look and validate if we need to add anything else? You're more experienced with nix. Should we include:
extraPullNames: nix-community
Should we include: extraPullNames: nix-community
No. nix flake update
only updates the inputs specified in the inputs
section of flake.nix
, so we won't build packages in this workflow. (flake-utils
and systems
are not defined in the flake, but they are included in the global registry of Nix.)
Even if we build packages, we only need Emacs executables, which is available on emacs-ci
cache on Cachix, which is configured in the flake.nix
of this repository. To enable the cache, you only need --accept-flake-config
flag (or accept-flake-config = true
in the config file as in test
workflow):
nix develop .#emacs-release-snapshot --accept-flake-config
@akirak do we also need --accept-flake-config
added to flake update action?
Note that peter-evans/create-pull-request doesn't trigger workflows by default. See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs for information.
Thank you for highlighting it. @zonuexe which option do you prefer? I reckon we could go with https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens or https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-using-ssh-deploy-keys but it's going to need some ground work done by you.
As we don't push to remote repository deployment ssh key should be enough.
do we also need --accept-flake-config added to flake update action?
No, we need it only for nix develop
. I have already added it to the test
workflow (see below), but it's unneeded for updating.
- uses: cachix/install-nix-action@v21
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
# Use the binary cache configured in `nixConfig` section
accept-flake-config = true
@zonuexe I have updated PR to use https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#push-using-ssh-deploy-keys
Please generated a SSH key and add private key as SSH_PRIVATE_KEY
in GitHub action secrets.
This should be good enough for us.
I generated a new SSH key and set it as deploy key and secrets.SSH_PRIVATE_KEY
.
Thank you all.
This is a scheduled action. It triggers once a month. It updates flake lock and creates a PR if file content changed.
In addition it's possible to trigger the action manually.
resolves #21