Compare commits
17 commits
Author | SHA1 | Date | |
---|---|---|---|
9e4da661e6 | |||
125c8df527 | |||
259d41d433 | |||
f93b8a43eb | |||
b9c200ab2c | |||
5600c653ef | |||
50771d8c28 | |||
237fc1eb70 | |||
261faee7d5 | |||
5a02cb44c8 | |||
4aa7aa99f9 | |||
13a20d2dac | |||
64cb3f9861 | |||
5ee9cac916 | |||
8dc3994648 | |||
eb6092ae72 | |||
8b9fb53ca5 |
3 changed files with 75 additions and 0 deletions
38
.forgejo/workflows/release.yml
Normal file
38
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
name: docker build
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME}}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN}}
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: false
|
||||
tags: karcsesz/fingerlink:latest
|
||||
- uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: false
|
||||
tags: karcsesz/fingerlink:latest-nano
|
||||
build-args: "editor=nano"
|
||||
binary:
|
||||
name: raw artifact
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/rust-toolchain@stable
|
||||
with:
|
||||
targets: "x86_64-unknown-linux-musl,aarch64-unknown-linux-musl"
|
||||
- run: apt-get update && apt-get install -y musl-tools
|
||||
- run: cargo build --release --target x86_64-unknown-linux-musl
|
||||
- run: mkdir _release && mv target/x86_64-unknown-linux-musl/release/fingerlink _release/fingerlink
|
||||
- uses: actions/forgejo-release@v1
|
||||
with:
|
||||
direction: upload
|
||||
release-dir: _release
|
9
.forgejo/workflows/test_on_push.yml
Normal file
9
.forgejo/workflows/test_on_push.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
name: cargo test
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/rust-toolchain@stable
|
||||
- run: cargo test --all-features
|
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
FROM rust:latest as builder
|
||||
LABEL authors="karcsesz"
|
||||
|
||||
ARG target=x86_64-unknown-linux-musl
|
||||
|
||||
RUN apt update && apt install -y musl-tools musl-dev
|
||||
RUN update-ca-certificates
|
||||
RUN rustup target add $target
|
||||
|
||||
WORKDIR /fingerlink
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN cargo build --target $target --release
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
ARG editor=vim
|
||||
|
||||
RUN apk add --no-cache $editor
|
||||
ENV EDITOR=$editor
|
||||
ENV PATH="${PATH}:/fingerlink"
|
||||
WORKDIR /fingerlink
|
||||
|
||||
COPY --from=builder /fingerlink/target/x86_64-unknown-linux-musl/release/fingerlink /fingerlink/fingerlink
|
||||
|
||||
ENTRYPOINT ["/fingerlink/fingerlink", "serve"]
|
||||
CMD ["--help"]
|
Loading…
Reference in a new issue