Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/pullfrog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,38 @@ jobs:
with:
fetch-depth: 1
persist-credentials: false
# Edited: what the review needs to run the repository's checks and
# tests. The environment admits only main, so the dev shell comes from
# the default branch, not a pull request's head.
- uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main
with:
determinate: false
# The agent's shell can reach the daemon and read /etc/nix and
# /nix/receipt.json: keep the job's token out of both, and keep the
# runner user untrusted, since a trusted user's settings, such as a
# post-build-hook, run as root.
github-token: ""
trust-runner-user: false
- name: Put the dev shell's tools on PATH
# bash, not the default shell, for pipefail: a failing print-dev-env
# must fail the step, not write an empty PATH.
shell: bash
env:
# Authenticated fetches of the flake's inputs, for this step only.
NIX_CONFIG: access-tokens = github.com=${{ github.token }}
TOKEN: ${{ github.token }}
run: |
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
nix print-dev-env --json |
Comment thread
kixelated marked this conversation as resolved.
Resolved
jq -r '.variables.PATH.value' |
tr ':' '\n' | grep '^/nix/store/' | paste -sd: >>"$GITHUB_PATH"
if sudo grep -rqF "$TOKEN" /etc/nix /nix/receipt.json; then
echo "the job token reached Nix's config" >&2
exit 1
fi
if ! nix store info --json | jq -e '.trusted == false or .trusted == 0' >/dev/null; then
echo "the Nix daemon trusts the runner user" >&2
exit 1
fi
- name: Run agent
uses: pullfrog/pullfrog@0741f79ecebfa4469a010644d2aed2d96d32d489 # v0.1.127
with:
Expand Down