Skip to content

Commit 6d820f0

Browse files
committed
ci: add a re-run manual workflow
1 parent 4ce44c0 commit 6d820f0

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/re-run.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: merge check
2+
3+
on:
4+
workflow_dispatch: # Must be run manually
5+
inputs:
6+
pr_number:
7+
description: 'Pull request number to test'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
check:
13+
name: Check mergeability
14+
runs-on: ubuntu-latest
15+
env:
16+
CCACHE_DIR: ${{ github.workspace }}/.ccache
17+
18+
steps:
19+
- name: Checkout fresh master
20+
uses: actions/checkout@v5
21+
with:
22+
ref: master
23+
fetch-depth: 1
24+
25+
- name: Merge PR into master
26+
run: |
27+
git config user.name "GitHub Actions"
28+
git config user.email "[email protected]"
29+
git fetch --depth=1 origin pull/${{ inputs.pr_number }}/head:pr-${{ inputs.pr_number }}
30+
git merge pr-${{ inputs.pr_number }} --no-ff -m "Test merge of PR #${{ inputs.pr_number }} into master"
31+
32+
- name: Install Nix
33+
uses: DeterminateSystems/nix-installer-action@main
34+
with:
35+
determinate: true
36+
extra-conf: lazy-trees = true
37+
38+
- name: Set Up Cachix
39+
uses: cachix/cachix-action@v15
40+
with:
41+
name: bitcoin-core
42+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
43+
44+
- name: Ccache cache
45+
uses: cirruslabs/cache@v4
46+
with:
47+
path: ${{ env.CCACHE_DIR }}
48+
key: ccache-${{ github.run_id }}
49+
50+
- name: Run `nix flake check`
51+
run: nix flake check ci/
52+
53+
- name: Build bitcoind
54+
run: |
55+
export CCACHE_DIR=${{ env.CCACHE_DIR }}
56+
nix build ci/ --option extra-sandbox-paths "${{ env.CCACHE_DIR }}"

0 commit comments

Comments
 (0)