Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic lockfile updating #783

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
],
"dictionaries": ["project"],
"ignorePaths": [
"**/flake.nix",
"**/CMakeLists.txt",
"**/pyproject.toml",
"**/iwyu_mappings.yml"
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Automatic updates

on:
schedule:
- cron: "0 12 ? * WED"
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-lockfiles:
name: Update lockfiles
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@master
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Switch branch
run: |
git switch -c lockfile-update
git reset --hard main
- name: Update Nix flake
run: nix flake update --commit-lock-file
- name: Update poetry
run: |
nix develop -c bash -c "cd misc; poetry update"
git add .
git commit -m "Update poetry lockfile" ||
echo "Did not update lockfile"
- run: git push -f origin lockfile-update
- run: gh pr create -B main -H lockfile-update -t "Update lockfiles" -b ""
env:
GH_TOKEN: ${{ github.token }}
68 changes: 43 additions & 25 deletions flake.lock

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

1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
{
description = "AWS IoT Greengrass runtime for constrained devices.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
flakelight.url = "github:nix-community/flakelight";
poetry2nix.url = "github:nix-community/poetry2nix";
};
Expand Down
Loading