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

ci: add Nix Flake Update GitHub workflow to keep flake inputs updated #520

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

trueNAHO
Copy link
Collaborator

@trueNAHO trueNAHO commented Aug 22, 2024

This change requires GitHub workflows to have read and write permissions 1 2.

This PR is stacked on top of the pending patchset #519 ("treewide: add developer shell and pre-commit hooks and simplify GitHub workflows") and should only be merged after it. Although ready for review, this PR will remain in Draft status until patchset "treewide: add developer shell and pre-commit hooks and simplify GitHub workflows" is merged.

NAHO (1):
  ci: add Nix Flake Update GitHub workflow to keep flake inputs updated

 .github/workflows/nix_flake_update.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 .github/workflows/nix_flake_update.yml

@trueNAHO trueNAHO changed the title ci: add nix flake update GitHub workflow to keep flake inputs updated ci: add Nix Flake Update GitHub workflow to keep flake inputs updated Aug 22, 2024
@trueNAHO trueNAHO force-pushed the ci-add-nix-flake-update-github-workflow-to-keep-flake-inputs-updated branch from 8793f7e to 29d97f4 Compare August 22, 2024 21:19
trueNAHO added a commit to trueNAHO/stylix that referenced this pull request Aug 22, 2024
@trueNAHO
Copy link
Collaborator Author

trueNAHO commented Sep 10, 2024

From 29d97f487312d3b56c4dd3da40cb43af858a02d4 Mon Sep 17 00:00:00 2001
From: NAHO <[email protected]>
Date: Thu, 22 Aug 2024 23:07:22 +0200
Subject: [PATCH] ci: add Nix Flake Update GitHub workflow to keep flake
 inputs updated

This change requires GitHub workflows to have read and write permissions
[1] [2].

[1]: https://github.com/DeterminateSystems/update-flake-lock/issues/75
[2]: https://github.com/DeterminateSystems/update-flake-lock/issues/88

Link: https://github.com/danth/stylix/pull/520
---
 .github/workflows/nix_flake_update.yml | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 .github/workflows/nix_flake_update.yml

diff --git a/.github/workflows/nix_flake_update.yml b/.github/workflows/nix_flake_update.yml
new file mode 100644
index 00000000..74c285d0
--- /dev/null
+++ b/.github/workflows/nix_flake_update.yml
@@ -0,0 +1,26 @@
+---
+name: Nix Flake Update
+
+on:  # yamllint disable-line rule:truthy
+  workflow_dispatch:
+
+  schedule:
+    - cron: "0 0 1 * *"
+
+jobs:
+  nix-flake-update:
+    runs-on: ubuntu-22.04
+
+    permissions:
+      contents: write
+      pull-requests: write
+
+    steps:
+      - uses: actions/checkout@v4
+      - uses: DeterminateSystems/nix-installer-action@v13
+      - uses: DeterminateSystems/magic-nix-cache-action@v6
+
+      - uses: DeterminateSystems/update-flake-lock@v23
+        with:
+          pr-labels: dependencies
+          pr-title: "stylix: update all flake inputs"

Bump dependencies:

  • magic-nix-cache-action: v6 -> v8
  • nix-installer-action: v13 -> v14
  • update-flake-lock: v23 -> v24

trueNAHO added a commit to trueNAHO/stylix that referenced this pull request Sep 11, 2024
@trueNAHO trueNAHO force-pushed the ci-add-nix-flake-update-github-workflow-to-keep-flake-inputs-updated branch from 29d97f4 to 706c8ef Compare September 11, 2024 15:39
@trueNAHO
Copy link
Collaborator Author

Changelog

v1: 706c8ef

v0: 29d97f4

@trueNAHO trueNAHO force-pushed the ci-add-nix-flake-update-github-workflow-to-keep-flake-inputs-updated branch from 706c8ef to 4be09d0 Compare November 26, 2024 07:10
@trueNAHO
Copy link
Collaborator Author

Changelog

v2: 4be09d0

  • Bump nix-installer-action GitHub Action: v14 -> v16

v1: 706c8ef

v0: 29d97f4

@trueNAHO trueNAHO marked this pull request as ready for review November 26, 2024 07:19
@trueNAHO
Copy link
Collaborator Author

This PR is stacked on top of the pending patchset #519 ("treewide: add developer shell and pre-commit hooks and simplify GitHub workflows") and should only be merged after it. Although ready for review, this PR will remain in Draft status until patchset "treewide: add developer shell and pre-commit hooks and simplify GitHub workflows" is merged.

Considering that #519 is taking longer than expected to get merged, we might want to already merge this PR. Consequently, I moved this PR out of draft mode.

@trueNAHO trueNAHO requested a review from danth November 26, 2024 07:20
Copy link
Owner

@danth danth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the GitHub App from #664 to allow GitHub Actions to run on the created pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants