ci: don't use graphql to commit (#188)
* ci: don't use graphql to commit * style: force reformatting of dev/flake.nix
This commit is contained in:
parent
5e1a679604
commit
4f978e6173
2 changed files with 30 additions and 28 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -25,6 +25,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PUSH_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set Git user info
|
||||||
|
run: |
|
||||||
|
git config user.name 'github-actions[bot]'
|
||||||
|
git config user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
|
||||||
- name: Get short revision
|
- name: Get short revision
|
||||||
id: rev
|
id: rev
|
||||||
|
@ -41,13 +48,11 @@ jobs:
|
||||||
'nixpkgs#nixfmt-rfc-style' -- .
|
'nixpkgs#nixfmt-rfc-style' -- .
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
env:
|
run: |
|
||||||
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
|
if ! git diff --color=always --exit-code; then
|
||||||
uses: planetscale/ghcommit-action@v0.1.39
|
git commit -am "style: format ${{ steps.rev.outputs.rev }}"
|
||||||
with:
|
git push
|
||||||
commit_message: "style: format ${{ steps.rev.outputs.rev }}"
|
fi
|
||||||
repo: "${{ github.repository }}"
|
|
||||||
branch: "${{ github.head_ref || github.ref_name }}"
|
|
||||||
|
|
||||||
validate-sources:
|
validate-sources:
|
||||||
name: Validate sources
|
name: Validate sources
|
||||||
|
|
|
@ -17,12 +17,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{
|
{ self
|
||||||
self,
|
, nixpkgs
|
||||||
nixpkgs,
|
, nixpkgs-stable
|
||||||
nixpkgs-stable,
|
, home-manager
|
||||||
home-manager,
|
, home-manager-stable
|
||||||
home-manager-stable,
|
,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
systems = [
|
systems = [
|
||||||
|
@ -41,11 +41,10 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
apps = forAllSystems (
|
apps = forAllSystems (
|
||||||
{
|
{ lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, system
|
||||||
system,
|
, ...
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
add-source = {
|
add-source = {
|
||||||
|
@ -73,11 +72,10 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
checks = forAllSystems (
|
checks = forAllSystems (
|
||||||
{
|
{ lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, system
|
||||||
system,
|
, ...
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
lib.optionalAttrs pkgs.stdenv.isLinux {
|
lib.optionalAttrs pkgs.stdenv.isLinux {
|
||||||
module-test-unstable = pkgs.callPackage ../test.nix { inherit home-manager; };
|
module-test-unstable = pkgs.callPackage ../test.nix { inherit home-manager; };
|
||||||
|
@ -90,11 +88,10 @@
|
||||||
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
||||||
|
|
||||||
packages = forAllSystems (
|
packages = forAllSystems (
|
||||||
{
|
{ lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, system
|
||||||
system,
|
, ...
|
||||||
...
|
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
version = self.shortRev or self.dirtyShortRev or "unknown";
|
version = self.shortRev or self.dirtyShortRev or "unknown";
|
||||||
|
|
Loading…
Reference in a new issue