Upgrade dependencies and base images (#598)

Signed-off-by: Sergio Castaño Arteaga <tegioz@icloud.com>
This commit is contained in:
Sergio Castaño Arteaga 2025-03-17 11:35:32 +01:00 committed by GitHub
parent fbdb69ced9
commit 216216c007
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 377 additions and 176 deletions

View File

@ -24,7 +24,7 @@ jobs:
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
uses: helm/chart-testing-action@v2.7.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
@ -35,7 +35,7 @@ jobs:
- name: Run chart-testing (lint)
run: ct lint --config .ct.yaml --target-branch ${{ github.event.repository.default_branch }}
- name: Create kind cluster
uses: helm/kind-action@v1.10.0
uses: helm/kind-action@v1.12.0
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install)
run: ct install --config .ct.yaml --target-branch ${{ github.event.repository.default_branch }}

View File

@ -15,7 +15,7 @@ jobs:
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.83.0
toolchain: 1.85.0
components: clippy, rustfmt
- name: Run clippy
run: cargo clippy --all-targets --all-features -- --deny warnings
@ -30,6 +30,6 @@ jobs:
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.83.0
toolchain: 1.85.0
- name: Run backend tests
run: cargo test

486
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -4,58 +4,58 @@ description = "GitVote server"
version = "1.4.0"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.83"
rust-version = "1.85"
[dependencies]
anyhow = "1.0.94"
askama = "0.12.1"
anyhow = "1.0.97"
askama = { git = "https://github.com/askama-rs/askama", rev = "70531eb", features = ["serde_json"] }
askama_axum = "0.4.0"
async-channel = "2.3.1"
async-trait = "0.1.83"
axum = { version = "0.7.9", features = ["macros"] }
clap = { version = "4.5.23", features = ["derive"] }
deadpool-postgres = { version = "0.14.0", features = ["serde"] }
async-trait = "0.1.88"
axum = { version = "0.8.1", features = ["macros"] }
clap = { version = "4.5.32", features = ["derive"] }
deadpool-postgres = { version = "0.14.1", features = ["serde"] }
figment = { version = "0.10.19", features = ["yaml", "env"] }
futures = "0.3.31"
graphql_client = { version = "0.14.0", features = ["reqwest"] }
hex = "0.4.3"
hmac = "0.12.1"
http = "0.2.12"
humantime = "2.1.0"
humantime = "2.2.0"
humantime-serde = "1.1.1"
ignore = "0.4.23"
jsonwebtoken = "9.3.0"
jsonwebtoken = "9.3.1"
lazy_static = "1.5.0"
octocrab = "=0.33.3"
openssl = { version = "0.10.68", features = ["vendored"] }
postgres-openssl = "0.5.0"
openssl = { version = "0.10.71", features = ["vendored"] }
postgres-openssl = "0.5.1"
regex = "1.11.1"
reqwest = "0.12.9"
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
reqwest = "0.12.14"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
serde_yaml = "0.9.34"
sha2 = "0.10.8"
thiserror = "2.0.6"
time = { version = "0.3.37", features = ["serde"] }
tokio = { version = "1.42.0", features = [
thiserror = "2.0.12"
time = { version = "0.3.39", features = ["serde"] }
tokio = { version = "1.44.1", features = [
"macros",
"rt-multi-thread",
"signal",
"time",
] }
tokio-postgres = { version = "0.7.12", features = [
tokio-postgres = { version = "0.7.13", features = [
"with-uuid-1",
"with-serde_json-1",
"with-time-0_3",
] }
tokio-util = { version = "0.7.13", features = ["rt"] }
tower = { version = "0.5.1", features = ["util"] }
tokio-util = { version = "0.7.14", features = ["rt"] }
tower = { version = "0.5.2", features = ["util"] }
tower-http = { version = "0.6.2", features = ["trace"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "json"] }
uuid = { version = "1.11.0", features = ["serde", "v4"] }
uuid = { version = "1.16.0", features = ["serde", "v4"] }
[dev-dependencies]
http-body = "1.0.1"
hyper = "1.5.1"
hyper = "1.6.0"
mockall = "0.13.1"

View File

@ -10,7 +10,7 @@ WORKDIR /gitvote/src
RUN cargo build --release
# Final stage
FROM alpine:3.21.0
FROM alpine:3.21.3
RUN apk --no-cache add ca-certificates && addgroup -S gitvote && adduser -S gitvote -G gitvote
USER gitvote
WORKDIR /home/gitvote

View File

@ -1,10 +1,10 @@
# Build tern
FROM golang:1.23.4-alpine3.21 AS tern
FROM golang:1.24.1-alpine3.21 AS tern
RUN apk --no-cache add git
RUN go install github.com/jackc/tern@latest
# Build final image
FROM alpine:3.21.0
FROM alpine:3.21.3
RUN addgroup -S gitvote && adduser -S gitvote -G gitvote
USER gitvote
WORKDIR /home/gitvote

View File

@ -2,11 +2,12 @@
//! supported endpoints.
use anyhow::{format_err, Error, Result};
use askama::Template;
use axum::{
body::Bytes,
extract::{FromRef, State},
http::{HeaderMap, HeaderValue, StatusCode},
response::IntoResponse,
response::{Html, IntoResponse},
routing::{get, post},
Router,
};
@ -65,7 +66,11 @@ pub(crate) fn setup_router(
/// Handler that returns the index document.
#[allow(clippy::unused_async)]
async fn index() -> impl IntoResponse {
tmpl::Index {}
let template = tmpl::Index {};
match template.render() {
Ok(html) => Ok(Html(html)),
Err(_) => Err(StatusCode::INTERNAL_SERVER_ERROR),
}
}
/// Handler that processes webhook events from GitHub.