Skip to content

Commit

Permalink
ci: don't use graphql to commit (#188)
Browse files Browse the repository at this point in the history
* ci: don't use graphql to commit

* style: force reformatting of dev/flake.nix
  • Loading branch information
getchoo authored May 21, 2024
1 parent 5e1a679 commit 4f978e6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
steps:
- name: Checkout repository
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
id: rev
Expand All @@ -41,13 +48,11 @@ jobs:
'nixpkgs#nixfmt-rfc-style' -- .
- name: Commit changes
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
uses: planetscale/[email protected]
with:
commit_message: "style: format ${{ steps.rev.outputs.rev }}"
repo: "${{ github.repository }}"
branch: "${{ github.head_ref || github.ref_name }}"
run: |
if ! git diff --color=always --exit-code; then
git commit -am "style: format ${{ steps.rev.outputs.rev }}"
git push
fi
validate-sources:
name: Validate sources
Expand Down
39 changes: 18 additions & 21 deletions dev/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
};

outputs =
{
self,
nixpkgs,
nixpkgs-stable,
home-manager,
home-manager-stable,
{ self
, nixpkgs
, nixpkgs-stable
, home-manager
, home-manager-stable
,
}:
let
systems = [
Expand All @@ -41,11 +41,10 @@
in
{
apps = forAllSystems (
{
lib,
pkgs,
system,
...
{ lib
, pkgs
, system
, ...
}:
{
add-source = {
Expand Down Expand Up @@ -73,11 +72,10 @@
);

checks = forAllSystems (
{
lib,
pkgs,
system,
...
{ lib
, pkgs
, system
, ...
}:
lib.optionalAttrs pkgs.stdenv.isLinux {
module-test-unstable = pkgs.callPackage ../test.nix { inherit home-manager; };
Expand All @@ -90,11 +88,10 @@
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);

packages = forAllSystems (
{
lib,
pkgs,
system,
...
{ lib
, pkgs
, system
, ...
}:
let
version = self.shortRev or self.dirtyShortRev or "unknown";
Expand Down

0 comments on commit 4f978e6

Please sign in to comment.