Skip to content

Commit 6d2b2d9

Browse files
committed
Add CI
1 parent 9e1611a commit 6d2b2d9

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
schedule:
9+
- cron: '30 13 * * *'
10+
11+
jobs:
12+
check:
13+
runs-on: ubuntu-24.04
14+
permissions:
15+
contents: "write"
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: DeterminateSystems/nix-installer-action@v11
19+
- uses: DeterminateSystems/magic-nix-cache-action@v6
20+
- uses: DeterminateSystems/flake-checker-action@v7
21+
with:
22+
ignore-missing-flake-lock: false
23+
fail-mode: true
24+
- name: Determine current version
25+
run: echo "BN_PREV_VERSION=$(nix eval .#binary-ninja-free.version --raw)" >> $GITHUB_ENV
26+
- name: Update hashes.js
27+
run: wget -O hashes.js https://binary.ninja/js/hashes.js
28+
- name: Determine new version
29+
run: echo "BN_NEXT_VERSION=$(nix eval .#binary-ninja-free.version --raw)" >> $GITHUB_ENV
30+
- name: Run `nix build`
31+
run: nix build
32+
- name: Commit updated version
33+
run: |-
34+
git config --global user.email "noreply@localhost"
35+
git config --global user.name "Binary Ninja Update"
36+
git diff --quiet || git commit -m "binary-ninja: $BN_PREV_VERSION -> $BN_NEXT_VERSION" hashes.js
37+
git push

.github/workflows/pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Pull Request CI
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
check:
8+
runs-on: ubuntu-24.04
9+
permissions:
10+
id-token: "write"
11+
contents: "read"
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: DeterminateSystems/nix-installer-action@v11
15+
- uses: DeterminateSystems/magic-nix-cache-action@v6
16+
- uses: DeterminateSystems/flake-checker-action@v7
17+
with:
18+
ignore-missing-flake-lock: false
19+
fail-mode: true
20+
- name: Run `nix build`
21+
run: nix build

hashes.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)