From ddffcc0885684bc725775a31b43f8d2f0d7a7c68 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 19 Jul 2021 20:25:47 +0200 Subject: [PATCH 1/4] Actions: Add warning on template string checks --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c14c07..f887333 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,7 @@ jobs: run: nix-instantiate --eval -E '(import {}).lib.version' - name: Setup cachix uses: cachix/cachix-action@v10 + # Don't replace the template string here! if: ${{ matrix.cachixName != '' }} with: name: ${{ matrix.cachixName }} @@ -61,5 +62,6 @@ jobs: # TODO switch to default nixpkgs channel once nix-build-uncached 1.0.0 is in stable run: nix run -I 'nixpkgs=channel:nixos-unstable' nixpkgs.nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs - name: Trigger NUR update + # Don't replace the template string here! if: ${{ matrix.nurRepo != '' }} run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}" From 430e33f5016697708b745475c51ddbc970b8c95d Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 19 Jul 2021 20:27:59 +0200 Subject: [PATCH 2/4] Actions: Add Cachix auth token instructions --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f887333..35ba022 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,8 +24,9 @@ jobs: # Format: Your cachix cache host name without the ".cachix.org" suffix. # Example: mycache (for mycache.cachix.org) # - # For this to work, you also need to set the CACHIX_SIGNING_KEY secret - # in your repository settings in Github found at https://github.com//nur-packages/settings/secrets + # For this to work, you also need to set the CACHIX_SIGNING_KEY or + # CACHIX_AUTH_TOKEN secret in your repository settings in Github found + # at https://github.com//nur-packages/settings/secrets cachixName: - nixPath: @@ -49,6 +50,8 @@ jobs: with: name: ${{ matrix.cachixName }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + # or: + #authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Check evaluation run: | nix-env -f . -qa \* --meta --xml \ From 89121a4e06c2f777b50c97ac5945ce6e232c33fd Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 19 Jul 2021 21:22:50 +0200 Subject: [PATCH 3/4] Actions: Make warnings explicit Co-authored-by: Francesco Gazzetta --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 35ba022..1b9f7f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: run: nix-instantiate --eval -E '(import {}).lib.version' - name: Setup cachix uses: cachix/cachix-action@v10 - # Don't replace the template string here! + # Don't replace here! if: ${{ matrix.cachixName != '' }} with: name: ${{ matrix.cachixName }} @@ -65,6 +65,6 @@ jobs: # TODO switch to default nixpkgs channel once nix-build-uncached 1.0.0 is in stable run: nix run -I 'nixpkgs=channel:nixos-unstable' nixpkgs.nix-build-uncached -c nix-build-uncached ci.nix -A cacheOutputs - name: Trigger NUR update - # Don't replace the template string here! + # Don't replace here! if: ${{ matrix.nurRepo != '' }} run: curl -XPOST "https://nur-update.herokuapp.com/update?repo=${{ matrix.nurRepo }}" From ac09392589cf60255dd7bd8b635e4a9e6d2b3b78 Mon Sep 17 00:00:00 2001 From: toonn Date: Tue, 20 Jul 2021 14:46:36 +0200 Subject: [PATCH 4/4] Actions: Provide both signing key and auth token The action doesn't produce an error on missing secrets so this way people don't have to remember to uncomment anything. --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b9f7f0..266535c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,8 +25,9 @@ jobs: # Example: mycache (for mycache.cachix.org) # # For this to work, you also need to set the CACHIX_SIGNING_KEY or - # CACHIX_AUTH_TOKEN secret in your repository settings in Github found - # at https://github.com//nur-packages/settings/secrets + # CACHIX_AUTH_TOKEN secret in your repository secrets settings in + # Github found at + # https://github.com//nur-packages/settings/secrets cachixName: - nixPath: @@ -50,8 +51,7 @@ jobs: with: name: ${{ matrix.cachixName }} signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - # or: - #authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - name: Check evaluation run: | nix-env -f . -qa \* --meta --xml \