feat: use Dockerfile (hello world)
All checks were successful
Test / test (push) Successful in 3s

Given I want to implement the core login in Rust, I don't want to have a
rust compile step for each invocation. So use a Dockerfile and it will
be built and cached by each Fogejo Runner.
This commit is contained in:
Paul Campbell 2024-09-17 16:26:32 +01:00
parent ba3ba3f48f
commit 1dbfd9fb7b
5 changed files with 22 additions and 25 deletions

5
.gitignore vendored
View file

@ -20,3 +20,8 @@ Cargo.lock
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
# Added by cargo
/target

6
Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "forgejo-todo-checker"
version = "0.1.0"
edition = "2021"
[dependencies]

8
Dockerfile Normal file
View file

@ -0,0 +1,8 @@
FROM docker.io/rust:1.81.0-bookworm
WORKDIR /app
COPY Cargo.toml ./
COPY src/ ./src/
RUN cargo build --release && mv target/release/forgejo-todo-checker .
ENTRYPOINT [ "/app/forgejo-todo-checker" ]

View file

@ -1,25 +0,0 @@
# SPDX-License-Identifier: MIT
name: "Forgejo TODO Checker"
author: "Paul Campbell"
description: |
Checks the source files to TODO and FIXME comments (configurable) that don't have an associated OPEN issue.
# input:
# none yet
# tags_regex: (TODO|FIXME)
# issue_regex: ( |)(\(|\(#)(?P<ISSUE_NUMBER>\d+)(\))
# token_key: '' - for private repos
# debug: false
runs:
using: "composite"
steps:
- run: echo "Forgejo TODO Checker"
shell: bash
- uses: actions/checkout@v3
- id: check
shell: bash
run: |
echo "job runs here"
ls -la
set

3
src/main.rs Normal file
View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}