Skip to content
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
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 7
groups:
actions:
patterns: ["*"]
ignore:
- dependency-name: DeterminateSystems/*
commit-message:
prefix: ci
10 changes: 8 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ jobs:
steps:
- name: git checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: DeterminateSystems/determinate-nix-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- run: nix develop -c action-validator -v ./.github/workflows/workflow.yml
- run: nix develop -c prettier --check .
- name: Validate GitHub Actions workflows
run: nix develop -c actionlint
- name: Check syntax
run: nix develop -c prettier --check .
- name: Check GitHub Actions security compliance
run: nix develop -c zizmor .github

DeterminateCI:
uses: ./.github/workflows/workflow.yml
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ jobs:

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# disabled pending strategy discussion on exposing tunables
# - uses: Determinatesystems/flake-checker-action@main
- uses: DeterminateSystems/determinate-nix-action@main
Expand Down Expand Up @@ -128,6 +130,8 @@ jobs:

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: DeterminateSystems/determinate-nix-action@main
with:
extra-conf: |
Expand Down Expand Up @@ -166,14 +170,16 @@ jobs:
if: |
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
- uses: actions/checkout@main
if: ${{ !github.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
if: ${{ !github.event.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
with:
persist-credentials: false
- uses: DeterminateSystems/determinate-nix-action@main
if: ${{ !github.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
if: ${{ !github.event.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
- uses: DeterminateSystems/flakehub-cache-action@main
if: ${{ !github.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
if: ${{ !github.event.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
- uses: DeterminateSystems/flakehub-push@main
if: ${{ !github.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
if: ${{ !github.event.repository.fork && inputs.visibility != '' && (github.ref == format('refs/heads/{0}', inputs.default-branch) || startsWith(github.ref, 'refs/tags/')) }}
id: publish
with:
rolling: ${{ github.ref == format('refs/heads/{0}', inputs.default-branch) }}
Expand Down
5 changes: 5 additions & 0 deletions .github/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
rules:
unpinned-uses:
config:
policies:
DeterminateSystems/*: ref-pin
Comment thread
coderabbitai[bot] marked this conversation as resolved.
27 changes: 6 additions & 21 deletions flake.lock

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

31 changes: 11 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
{
inputs = {
nixpkgs.url = "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/*";

# For action-validator, which is broken with new rust versions
nixpkgs-old.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2411.717196";
};
inputs.nixpkgs.url = "https://flakehub.com/f/DeterminateSystems/nixpkgs-weekly/*";

outputs =
{ nixpkgs, nixpkgs-old, ... }:
{ self, ... }@inputs:
let
inherit (nixpkgs) lib;
inherit (inputs.nixpkgs) lib;

systems = [
"aarch64-linux"
Expand All @@ -20,27 +15,23 @@
forEachSystem =
f:
lib.genAttrs systems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs-old = nixpkgs-old.legacyPackages.${system};
in
f { inherit pkgs pkgs-old; }
system: f { pkgs = import inputs.nixpkgs { inherit system; }; }
);
in
{

devShells = forEachSystem (
{ pkgs, pkgs-old }:
{ pkgs }:
{
default = pkgs.mkShellNoCC {
buildInputs = [
pkgs.nodePackages.prettier

pkgs-old.action-validator
packages = with pkgs; [
actionlint
prettier
zizmor
];
};
}
);

formatter = forEachSystem ({ pkgs }: pkgs.nixfmt);
};
}