workflows/build: run trusted nix-build-uncached
This was previously run from the untrusted checkout, which would allow extracting the cachix secret easily.
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -12,6 +12,9 @@ on:
|
|||||||
mergedSha:
|
mergedSha:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
targetSha:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
secrets:
|
secrets:
|
||||||
CACHIX_AUTH_TOKEN:
|
CACHIX_AUTH_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
@@ -55,6 +58,7 @@ jobs:
|
|||||||
uses: ./.github/actions/checkout
|
uses: ./.github/actions/checkout
|
||||||
with:
|
with:
|
||||||
merged-as-untrusted-at: ${{ inputs.mergedSha }}
|
merged-as-untrusted-at: ${{ inputs.mergedSha }}
|
||||||
|
target-as-trusted-at: ${{ inputs.targetSha }}
|
||||||
|
|
||||||
- uses: cachix/install-nix-action@456688f15bc354bef6d396e4a35f4f89d40bf2b7 # v31
|
- uses: cachix/install-nix-action@456688f15bc354bef6d396e4a35f4f89d40bf2b7 # v31
|
||||||
with:
|
with:
|
||||||
@@ -69,7 +73,7 @@ jobs:
|
|||||||
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
pushFilter: '(-source$|-nixpkgs-tarball-)'
|
pushFilter: '(-source$|-nixpkgs-tarball-)'
|
||||||
|
|
||||||
- run: nix-env --install -f nixpkgs/untrusted-pinned -A nix-build-uncached
|
- run: nix-env --install -f nixpkgs/trusted-pinned -A nix-build-uncached
|
||||||
|
|
||||||
- name: Build shell
|
- name: Build shell
|
||||||
if: contains(matrix.builds, 'shell')
|
if: contains(matrix.builds, 'shell')
|
||||||
|
|||||||
1
.github/workflows/pull-request-target.yml
vendored
1
.github/workflows/pull-request-target.yml
vendored
@@ -119,6 +119,7 @@ jobs:
|
|||||||
artifact-prefix: ${{ inputs.artifact-prefix }}
|
artifact-prefix: ${{ inputs.artifact-prefix }}
|
||||||
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
|
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
|
||||||
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
|
mergedSha: ${{ needs.prepare.outputs.mergedSha }}
|
||||||
|
targetSha: ${{ needs.prepare.outputs.targetSha }}
|
||||||
|
|
||||||
# This job's only purpose is to create the target for the "Required Status Checks" branch ruleset.
|
# This job's only purpose is to create the target for the "Required Status Checks" branch ruleset.
|
||||||
# It "needs" all the jobs that should block merging a PR.
|
# It "needs" all the jobs that should block merging a PR.
|
||||||
|
|||||||
Reference in New Issue
Block a user