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: don't use graphql to commit #188

Merged
merged 2 commits into from
May 21, 2024
Merged
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
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