WIP #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup node.js | |
uses: actions/setup-node@v4 | |
- name: Install node modules | |
working-directory: ./web | |
run: npm ci | |
- name: Build web frontend | |
working-directory: ./web | |
run: npm run build | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Add musl target | |
run: | | |
rustup target add x86_64-unknown-linux-musl | |
- name: Build Binary | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --target x86_64-unknown-linux-musl | |
- name: ls | |
run: ls target | |
- name: Archive binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: iptablesweb | |
path: target/x86_64-unknown-linux-musl/release/iptablesweb | |