Skip to content

Commit

Permalink
ci: propagate GITHUB_TOKEN into the container (#45)
Browse files Browse the repository at this point in the history
* ci: bump install-nix-action to v19

* ci: propagate GITHUB_TOKEN into the container
  • Loading branch information
lilyinstarlight committed Feb 6, 2023
1 parent 7e3d175 commit dbae1d3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
nix_release: ${{ steps.update.outputs.nix_release }}
updated: ${{ steps.update.outputs.updated }}
steps:
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v19
with:
nix_path: nixpkgs=channel:nixpkgs-unstable

Expand Down Expand Up @@ -57,11 +57,9 @@ jobs:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: cachix/install-nix-action@v18
- uses: cachix/install-nix-action@v19
with:
install_url: ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ needs.update.outputs.nix_release }}/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixpkgs-unstable

- name: Run nix-info
Expand All @@ -82,9 +80,11 @@ jobs:
if: runner.os == 'Linux'
env:
NIX_RELEASE: ${{ needs.update.outputs.nix_release }}
GITHUB_TOKEN: ${{ github.token }}
run: |
docker run --rm "nix:${NIX_RELEASE#nix-}" \
nix --extra-experimental-features 'nix-command flakes' run nixpkgs#nix-info -- -m
docker run --rm -e GITHUB_TOKEN "nix:${NIX_RELEASE#nix-}" \
sh -c 'echo "access-tokens = github.com=$GITHUB_TOKEN" >> /etc/nix/nix.conf && \
nix --extra-experimental-features "nix-command flakes" run nixpkgs#nix-info -- -m'
release:
name: Release
Expand Down

0 comments on commit dbae1d3

Please sign in to comment.