Skip to content
Open
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
5 changes: 5 additions & 0 deletions .agents/skills/watch-github-actions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ The public diagnostic intentionally omits them; detailed review needs an
approved private destination. Helpers must come from the workflow revision,
not from the candidate under scan.

`setup-nix` always uses read-only Cachix access. `Populate Nix Cache` is the only
cache writer and runs after pushes to `main`. If it fails because its credential
is missing, follow the environment setup in `CI.md#nix-cache-access`; never add
a Cachix write token to repository or organization secrets.

`setup-nix` retries development-shell preparation once when `prepare-shell`
is enabled. Inspect both attempts in the job log; `setup-rust` assumes the
shell has already been prepared. Cargo, lint, and test commands are not retried.
Expand Down
10 changes: 2 additions & 8 deletions .github/actions/setup-nix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
# SPDX-License-Identifier: Apache-2.0

name: Setup Nix
description: Install Determinate Nix, configure Cachix, and optionally prepare the development shell
description: Install Determinate Nix, configure read-only Cachix access, and optionally prepare the development shell

inputs:
cachix-auth-token:
description: Token used to write build outputs to Cachix
required: false
default: ""

prepare-shell:
description: Prepare the development shell, retrying once on failure
required: false
Expand All @@ -30,8 +25,7 @@ runs:
- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
name: openshell
authToken: ${{ inputs.cachix-auth-token }}
skipPush: ${{ inputs.cachix-auth-token == '' }}
skipPush: true

- name: Prepare Nix development shell
if: inputs.prepare-shell == 'true'
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/branch-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ jobs:

- uses: ./.github/actions/setup-nix
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
prepare-shell: "true"
shell-installable: .#devShells.x86_64-linux.default

Expand All @@ -211,7 +210,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Format
shell: nix develop -c bash -euo pipefail {0}
Expand All @@ -233,7 +231,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Verify Cargo lockfiles
shell: nix develop -c bash -euo pipefail {0}
Expand Down Expand Up @@ -261,7 +258,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -298,7 +294,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -329,7 +324,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -365,7 +359,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -415,7 +408,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand All @@ -440,7 +432,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand All @@ -467,7 +458,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- uses: ./.github/actions/setup-rust
with:
Expand Down Expand Up @@ -524,6 +514,7 @@ jobs:

- name: Test release qualification summary
run: mise run test:qualification-summary

go:
name: Go SDK
needs: pr_metadata
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/branch-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,6 @@ jobs:
uses: ./.github/workflows/build-binaries.yml
with:
cargo-version: ${{ needs.version.outputs.cargo }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

build-gateway-plain:
name: openshell-gateway driver-free (${{ matrix.triple }})
Expand All @@ -134,7 +132,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/build-rust-binary
with:
package: openshell-gateway
Expand Down Expand Up @@ -175,7 +172,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/build-rust-binary
with:
package: ${{ matrix.package }}
Expand All @@ -191,8 +187,6 @@ jobs:
uses: ./.github/workflows/build-vm-driver.yml
with:
cargo-version: ${{ needs.version.outputs.cargo }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

build-images:
needs: [pr_metadata, build-binaries]
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
required: false
type: string
default: ""
secrets:
CACHIX_AUTH_TOKEN:
required: true

permissions:
contents: read
Expand Down Expand Up @@ -52,7 +49,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- uses: ./.github/actions/build-rust-binary
with:
package: ${{ env.PACKAGE }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/build-vm-driver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
required: false
type: string
default: ""
secrets:
CACHIX_AUTH_TOKEN:
required: true

permissions:
contents: read
Expand Down Expand Up @@ -54,7 +51,6 @@ jobs:
- uses: ./.github/actions/setup-nix
with:
prepare-shell: "true"
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Download openshell-sandbox
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: Populate Nix Cache

on:
push:
branches: [main]

permissions:
contents: read

concurrency:
group: cachix-write
cancel-in-progress: false

jobs:
populate:
if: github.repository == 'NVIDIA/OpenShell' && github.event_name == 'push' && github.ref == 'refs/heads/main'
# Configure this environment to allow only the main branch BEFORE adding
# its secret. Ref checks in YAML cannot protect a repository-wide secret.
environment: cachix-write
strategy:
fail-fast: false
matrix:
include:
- system: x86_64-linux
runner: ubuntu-24.04
- system: aarch64-linux
runner: ubuntu-24.04-arm
- system: aarch64-darwin
runner: macos-15-xlarge
# Keep credential-bearing work on fresh GitHub-hosted runners.
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
steps:
- name: Require the environment credential
env:
CACHIX_WRITE_TOKEN: ${{ secrets.CACHIX_WRITE_TOKEN }}
run: |
if [ -z "$CACHIX_WRITE_TOKEN" ]; then
echo "::error::Configure the cachix-write environment as documented in CI.md."
exit 1
fi

- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
ref: ${{ github.sha }}

- uses: DeterminateSystems/determinate-nix-action@e847f25223456b3058e12f7fc9d777b6a6f25060 # v3.23.2
with:
github-token: ${{ github.token }}
summarize: false

- uses: cachix/cachix-action@5f2d7c5294214f71b873db4b969586b980625e71 # v17
with:
name: openshell
authToken: ${{ secrets.CACHIX_WRITE_TOKEN }}

- name: Build the development shell and VM runtime
env:
NIX_SYSTEM: ${{ matrix.system }}
run: |
# HTTP 416 is not retried by Nix; restart the build once on failure.
nix build --no-link ".#devShells.${NIX_SYSTEM}.default" .#vm-runtime || \
nix build --no-link ".#devShells.${NIX_SYSTEM}.default" .#vm-runtime
7 changes: 0 additions & 7 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ on:
source_sha:
description: Source commit resolved from the release tag
value: ${{ jobs.compute-versions.outputs.source_sha }}
secrets:
CACHIX_AUTH_TOKEN:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -116,8 +113,6 @@ jobs:
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
supervisor-image-tag: ${{ needs.compute-versions.outputs.semver }}
checkout-ref: ${{ needs.compute-versions.outputs.source_sha }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

build-vm-driver:
needs: [compute-versions, build-binaries]
Expand All @@ -128,8 +123,6 @@ jobs:
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
supervisor-image-tag: ${{ needs.compute-versions.outputs.semver }}
checkout-ref: ${{ needs.compute-versions.outputs.source_sha }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

package-binaries:
needs: [compute-versions, build-binaries, build-vm-driver]
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ jobs:
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
supervisor-image-tag: dev
checkout-ref: ${{ github.sha }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

build-vm-driver:
needs: [compute-versions, build-binaries]
Expand All @@ -80,8 +78,6 @@ jobs:
cargo-version: ${{ needs.compute-versions.outputs.cargo_version }}
supervisor-image-tag: dev
checkout-ref: ${{ github.sha }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

package-binaries:
needs: [build-binaries, build-vm-driver]
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
with:
release-tag: ${{ inputs.tag || github.ref_name }}
is-prerelease: true
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

publish:
name: Publish
Expand Down Expand Up @@ -66,7 +64,6 @@ jobs:
is-prerelease: true
secrets:
CODEX_SECURITY_API_KEY: ${{ secrets.CODEX_SECURITY_API_KEY }}
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

notify-prerelease-success:
name: Notify Prerelease Success
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ on:
secrets:
CODEX_SECURITY_API_KEY:
required: true
CACHIX_AUTH_TOKEN:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -51,8 +49,6 @@ jobs:
ghcr.io/nvidia/openshell/gateway:${{ inputs.source-sha }}
ghcr.io/nvidia/openshell/sandbox:${{ inputs.source-sha }}
ghcr.io/nvidia/openshell/supervisor:${{ inputs.source-sha }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

prepare-integration:
permissions:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
with:
release-tag: ${{ inputs.tag || github.ref_name }}
is-prerelease: false
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

qualify:
name: Qualify
Expand All @@ -45,7 +43,6 @@ jobs:
is-prerelease: false
secrets:
CODEX_SECURITY_API_KEY: ${{ secrets.CODEX_SECURITY_API_KEY }}
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

publish:
name: Publish
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ on:
description: Newline-separated packaged Helm chart OCI references for Trivy
default: ""
type: string
secrets:
CACHIX_AUTH_TOKEN:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -73,8 +70,6 @@ jobs:
ignore-unfixed: false
images: ${{ inputs.images }}
charts: ${{ inputs.charts }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}

cargo-deny:
name: Cargo Deny
Expand All @@ -95,5 +90,3 @@ jobs:
with:
candidate_ref: ${{ inputs.candidate_ref }}
fail-on-findings: ${{ inputs.fail-on-static-findings }}
secrets:
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
Loading
Loading