Skip to content

Commit 43b833d

Browse files
committed
chore: rework actions a little
1 parent 8833f20 commit 43b833d

File tree

4 files changed

+53
-21
lines changed

4 files changed

+53
-21
lines changed

.github/actions/build/action.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build
2+
description: Builds the index
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Install ARM cross-compilation tools
8+
run: sudo apt-get update && sudo apt-get install --assume-yes --no-install-recommends g++-aarch64-linux-gnu
9+
10+
- name: Setup environment
11+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
12+
13+
- name: Install rust
14+
run: |
15+
rustup toolchain install stable --profile minimal
16+
rustup target add aarch64-unknown-linux-gnu
17+
18+
- name: Setup cache
19+
uses: Swatinem/rust-cache@v2
20+
21+
- name: Build
22+
id: build
23+
run: |
24+
cargo build --release --target aarch64-unknown-linux-gnu

.github/workflows/build.yaml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Build Index
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Build
18+
uses: ./.github/actions/build
19+
20+
- name: Upload artifact
21+
uses: @actions/upload-artifact@v4
22+
with:
23+
name: geode-index
24+
path: ./target/aarch64-unknown-linux-gnu/release/geode-index

.github/workflows/deploy-api-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77

88
jobs:
9-
build:
9+
build-api-docs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v4
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
path: swagger-ui
2727

28-
deploy:
28+
deploy-api-docs:
2929
needs: build
3030
permissions:
3131
pages: write

.github/workflows/deploy.yaml

+3-19
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,11 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout code
13-
uses: actions/checkout@v2
14-
15-
- name: Install stuff
16-
run: sudo apt-get update && sudo apt-get install --assume-yes --no-install-recommends g++-aarch64-linux-gnu
17-
18-
- name: Setup env
19-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
20-
21-
- name: Install rust
22-
run: |
23-
rustup toolchain install stable --profile minimal
24-
rustup target add aarch64-unknown-linux-gnu
25-
26-
- name: Setup cache
27-
uses: Swatinem/rust-cache@v2
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
2814

2915
- name: Build
30-
id: build
31-
run: |
32-
cargo build --release --target aarch64-unknown-linux-gnu
16+
uses: ./.github/actions/build
3317

3418
- name: Create ssh key
3519
run: |

0 commit comments

Comments
 (0)