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:
parent
ba3ba3f48f
commit
1dbfd9fb7b
5 changed files with 22 additions and 25 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -20,3 +20,8 @@ Cargo.lock
|
|||
# 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.
|
||||
#.idea/
|
||||
|
||||
|
||||
# Added by cargo
|
||||
|
||||
/target
|
||||
|
|
6
Cargo.toml
Normal file
6
Cargo.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "forgejo-todo-checker"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
8
Dockerfile
Normal file
8
Dockerfile
Normal 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" ]
|
25
action.yml
25
action.yml
|
@ -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
3
src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
Loading…
Reference in a new issue