Merge pull request #407 from qowoz/buildbot

switch to buildbot
This commit is contained in:
zowoq 2024-04-28 10:22:12 +10:00 committed by GitHub
commit 10b64aaaf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 51 additions and 40 deletions

View File

@ -1,17 +0,0 @@
name: "CI"
on:
pull_request:
push:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v20
- uses: cachix/cachix-action@v12
with:
name: nixpkgs-update
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build --accept-flake-config
- run: nix flake check

View File

@ -6,23 +6,44 @@ on:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "doc"
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v15
- uses: cachix/install-nix-action@v26
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- run: nix build .#nixpkgs-update-doc
- if: success()
uses: crazy-max/ghaction-github-pages@v4
accept-flake-config = true
experimental-features = nix-command flakes
max-jobs = 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build Pages
run: |
nix build .#nixpkgs-update-doc
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
target_branch: gh-pages
build_dir: result/multi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: ./result/multi
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: publish
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -38,4 +38,4 @@ nix run nixpkgs#haskellPackages.hpack
Source files are formatted with [Ormolu](https://github.com/tweag/ormolu).
There is also a [Cachix cache](https://nixpkgs-update.cachix.org/) available for the dependencies of this program.
There is also a [Cachix cache](https://nix-community.cachix.org/) available for the dependencies of this program.

View File

@ -9,8 +9,8 @@ Run without installing on stable Nix:
```ShellSession
$ nix run \
--option extra-substituters 'https://nixpkgs-update.cachix.org/' \
--option extra-trusted-public-keys 'nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=' \
--option extra-substituters 'https://nix-community.cachix.org/' \
--option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' \
-f https://github.com/ryantm/nixpkgs-update/archive/main.tar.gz \
-c nixpkgs-update --help
```
@ -19,8 +19,8 @@ Run without installing on unstable Nix with nix command enabled:
```ShellSession
$ nix shell \
--option extra-substituters 'https://nixpkgs-update.cachix.org/' \
--option extra-trusted-public-keys 'nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=' \
--option extra-substituters 'https://nix-community.cachix.org/' \
--option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' \
-f https://github.com/ryantm/nixpkgs-update/archive/main.tar.gz \
-c nixpkgs-update --help
```
@ -29,8 +29,8 @@ Run without installing on unstable Nix with nix flakes enabled:
```ShellSession
$ nix run \
--option extra-substituters 'https://nixpkgs-update.cachix.org/' \
--option extra-trusted-public-keys 'nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=' \
--option extra-substituters 'https://nix-community.cachix.org/' \
--option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' \
github:ryantm/nixpkgs-update -- --help
```
@ -38,8 +38,8 @@ Install into your Nix profile:
```ShellSession
$ nix-env \
--option extra-substituters 'https://nixpkgs-update.cachix.org/' \
--option extra-trusted-public-keys 'nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=' \
--option extra-substituters 'https://nix-community.cachix.org/' \
--option extra-trusted-public-keys 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' \
-if https://github.com/ryantm/nixpkgs-update/archive/main.tar.gz
```

View File

@ -4,11 +4,18 @@
inputs.mmdoc.url = "github:ryantm/mmdoc";
inputs.mmdoc.inputs.nixpkgs.follows = "nixpkgs";
nixConfig.extra-substituters = "https://nixpkgs-update.cachix.org";
nixConfig.extra-trusted-public-keys = "nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8=";
nixConfig.extra-substituters = "https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
outputs = { self, nixpkgs, mmdoc } @ args:
{
checks.x86_64-linux =
let
packages = nixpkgs.lib.mapAttrs' (n: nixpkgs.lib.nameValuePair "package-${n}") self.packages.x86_64-linux;
devShells = nixpkgs.lib.mapAttrs' (n: nixpkgs.lib.nameValuePair "devShell-${n}") self.devShells.x86_64-linux;
in
packages // devShells;
packages.x86_64-linux = import ./pkgs/default.nix (args // { system = "x86_64-linux"; });
devShells.x86_64-linux.default = self.packages."x86_64-linux".devShell;