···
1
-
name: Get merge commit
3
-
description: 'Checks whether the Pull Request is mergeable and checks out the repo at up to two commits: The result of a temporary merge of the head branch into the target branch ("merged"), and the parent of that commit on the target branch ("target"). Handles push events and merge conflicts gracefully.'
7
-
description: "The merge commit SHA, previously collected."
10
-
description: "Whether to checkout the merge commit in the ./untrusted folder."
13
-
description: "Whether to checkout the pinned nixpkgs for CI and from where (trusted, untrusted)."
16
-
description: "The target commit SHA, previously collected."
19
-
description: "Whether to checkout the target commit in the ./trusted folder."
24
-
description: "The merge commit SHA"
25
-
value: ${{ steps.commits.outputs.mergedSha }}
27
-
description: "The target commit SHA"
28
-
value: ${{ steps.commits.outputs.targetSha }}
34
-
if: ${{ !inputs.mergedSha && !inputs.targetSha }}
35
-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
38
-
require('./ci/github-script/prepare.js')({
44
-
- if: inputs.merged-as-untrusted && (inputs.mergedSha || steps.commits.outputs.mergedSha)
45
-
# Would be great to do the checkouts in git worktrees of the existing spare checkout instead,
46
-
# but Nix is broken with them:
47
-
# https://github.com/NixOS/nix/issues/6073
48
-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
50
-
ref: ${{ inputs.mergedSha || steps.commits.outputs.mergedSha }}
53
-
- if: inputs.target-as-trusted && (inputs.targetSha || steps.commits.outputs.targetSha)
54
-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
56
-
ref: ${{ inputs.targetSha || steps.commits.outputs.targetSha }}
59
-
- if: inputs.pinnedFrom
61
-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
63
-
PINNED_FROM: ${{ inputs.pinnedFrom }}
66
-
const path = require('node:path')
67
-
const pinned = require(path.resolve(path.join(process.env.PINNED_FROM, 'ci', 'pinned.json')))
68
-
core.setOutput('pinnedSha', pinned.pins.nixpkgs.revision)
70
-
- if: steps.pinned.outputs.pinnedSha
71
-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
73
-
ref: ${{ steps.pinned.outputs.pinnedSha }}