Compare commits

...

17 commits
master ... ci

Author SHA1 Message Date
9e4da661e6 apt-get requires -y
Some checks failed
/ docker build (push) Failing after 4s
/ raw artifact (push) Failing after 1m11s
/ cargo test (push) Successful in 22s
2024-03-18 01:40:11 +01:00
125c8df527 Don't forget MUSL tools which will definitely also completely explode when cross-compiling
Some checks failed
/ cargo test (push) Waiting to run
/ docker build (push) Failing after 3s
/ raw artifact (push) Has been cancelled
2024-03-18 01:38:54 +01:00
259d41d433 So this is how tags work
Some checks failed
/ raw artifact (push) Failing after 23s
/ docker build (push) Failing after 4s
/ cargo test (push) Successful in 22s
2024-03-18 01:35:51 +01:00
f93b8a43eb Run on created releases instead of tags
All checks were successful
/ cargo test (push) Successful in 23s
2024-03-18 01:32:23 +01:00
b9c200ab2c Attempt to run build only on releases and generate an actual release with artifacts
All checks were successful
/ cargo test (push) Successful in 21s
2024-03-18 01:30:19 +01:00
5600c653ef Make nano actually build with nano and disable push to not get rate limited
All checks were successful
/ cargo test (push) Successful in 22s
/ docker build (push) Successful in 5s
2024-03-18 01:02:54 +01:00
50771d8c28 aaaaaaaa
All checks were successful
/ cargo test (push) Successful in 24s
/ docker build (push) Successful in 1m11s
2024-03-18 00:56:44 +01:00
237fc1eb70 Add target dir to PATH
Some checks failed
/ cargo test (push) Has been cancelled
/ docker build (push) Has been cancelled
2024-03-18 00:55:14 +01:00
261faee7d5 Add nano as an option 2024-03-18 00:42:32 +01:00
5a02cb44c8 Switch to alpine and provide default editor 2024-03-18 00:38:26 +01:00
4aa7aa99f9 But I can only provide ubuntu-22.04
Some checks are pending
/ cargo test (push) Waiting to run
/ docker build (push) Successful in 1m18s
2024-03-18 00:29:46 +01:00
13a20d2dac docker build workflow requires ubuntu-latest
Some checks failed
/ cargo test (push) Has been cancelled
/ docker build (push) Has been cancelled
2024-03-18 00:28:37 +01:00
64cb3f9861 Docker image question mark?
Some checks failed
/ cargo test (push) Successful in 22s
/ docker build (push) Failing after 7s
2024-03-18 00:17:53 +01:00
5ee9cac916 Locally mirrored actions are all called actions/
All checks were successful
/ cargo test (push) Successful in 34s
2024-03-17 23:11:43 +01:00
8dc3994648 Runs-on should be docker otherwise no runner is assigned
Some checks failed
/ cargo test (push) Failing after 16s
2024-03-17 22:52:26 +01:00
eb6092ae72 Dockerfile added
Some checks failed
/ cargo test (push) Has been cancelled
2024-03-17 22:49:30 +01:00
8b9fb53ca5 CI attempt: automated testing 2024-03-17 22:12:59 +01:00
3 changed files with 75 additions and 0 deletions

View 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

View 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
View 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"]