Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
77b0ede555 chore(deps): bump aes-gcm from 0.10.2 to 0.10.3
Bumps [aes-gcm](https://github.com/RustCrypto/AEADs) from 0.10.2 to 0.10.3.
- [Commits](https://github.com/RustCrypto/AEADs/compare/aes-gcm-v0.10.2...aes-gcm-v0.10.3)

---
updated-dependencies:
- dependency-name: aes-gcm
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 16:13:33 +00:00
6 changed files with 106 additions and 31 deletions

View File

@@ -12,4 +12,3 @@ src/cache_buster_data.json
browser/target browser/target
browser/cobertura.xml browser/cobertura.xml
browser/docs browser/docs
**/target

View File

@@ -12,21 +12,54 @@ jobs:
fmt: fmt:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
# Ensure rustfmt is installed and setup problem matcher - name: ⚡ Cache
- uses: actions-rust-lang/setup-rust-toolchain@v1 uses: actions/cache@v2
with: with:
path: |
~/.cargo/registry
~/.cargo/git
node_modules
./docs/openapi/node_modules
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt components: rustfmt
- name: Rustfmt Check - name: Check with rustfmt
uses: actions-rust-lang/rustfmt@v1 uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy: clippy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
- uses: actions-rust-lang/setup-rust-toolchain@v1 - name: ⚡ Cache
uses: actions/cache@v2
with: with:
path: |
~/.cargo/registry
~/.cargo/git
node_modules
./docs/openapi/node_modules
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy components: clippy
override: true
- uses: actions/setup-node@v2 - uses: actions/setup-node@v2
with: with:
@@ -35,5 +68,8 @@ jobs:
- name: Build frontend - name: Build frontend
run: make frontend run: make frontend
- name: clippy Check - name: Check with Clippy
run: cargo clippy --workspace --tests --all-features uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --tests --all-features

View File

@@ -68,7 +68,18 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
- name: ⚡ Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
node_modules
./docs/openapi/node_modules
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: load env - name: load env
run: | run: |
@@ -81,7 +92,12 @@ jobs:
with: with:
node-version: "18.0.0" node-version: "18.0.0"
- uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu
profile: minimal
override: true
- name: Build frontend - name: Build frontend
run: make frontend run: make frontend

View File

@@ -9,7 +9,7 @@ on:
branches: branches:
- master - master
- "*" - "*"
- "!gh-pages" - '!gh-pages'
jobs: jobs:
build_and_test: build_and_test:
@@ -17,7 +17,9 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
version: version:
#- 1.51.0
- stable - stable
# - nightly
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -53,7 +55,7 @@ jobs:
maria: maria:
image: mariadb:10 image: mariadb:10
env: env:
MARIADB_USER: "maria" MARIADB_USER: "maria"
MARIADB_PASSWORD: "password" MARIADB_PASSWORD: "password"
MARIADB_ROOT_PASSWORD: "password" MARIADB_ROOT_PASSWORD: "password"
@@ -67,17 +69,17 @@ jobs:
- 3306:3306 - 3306:3306
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v2
#- name: ⚡ Cache - name: ⚡ Cache
# uses: actions/cache@v2 uses: actions/cache@v2
# with: with:
# path: | path: |
# ~/.cargo/registry ~/.cargo/registry
# ~/.cargo/git ~/.cargo/git
# node_modules node_modules
# ./docs/openapi/node_modules ./docs/openapi/node_modules
# target target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: configure GPG key - name: configure GPG key
if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'mCaptcha/mCaptcha' if: (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'mCaptcha/mCaptcha'
@@ -95,7 +97,12 @@ jobs:
with: with:
node-version: "18.0.0" node-version: "18.0.0"
- uses: actions-rust-lang/setup-rust-toolchain@v1 - name: Install ${{ matrix.version }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}-x86_64-unknown-linux-gnu
profile: minimal
override: true
- name: install nightwatch dep - name: install nightwatch dep
run: sudo apt-get install xvfb run: sudo apt-get install xvfb
@@ -110,8 +117,7 @@ jobs:
run: make run: make
env: env:
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}" POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
MARIA_DATABASE_URL: MARIA_DATABASE_URL: "${{ env.MARIA_DATABASE_URL }}"
"${{ env.MARIA_DATABASE_URL }}"
# - name: build frontend # - name: build frontend
# run: make frontend # run: make frontend

4
Cargo.lock generated
View File

@@ -327,9 +327,9 @@ dependencies = [
[[package]] [[package]]
name = "aes-gcm" name = "aes-gcm"
version = "0.10.2" version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
dependencies = [ dependencies = [
"aead", "aead",
"aes", "aes",

View File

@@ -1,6 +1,7 @@
# SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net> # SPDX-FileCopyrightText: 2023 Aravinth Manivannan <realaravinth@batsense.net>
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
FROM node:18.0.0 as frontend FROM node:18.0.0 as frontend
RUN set -ex; \ RUN set -ex; \
apt-get update; \ apt-get update; \
@@ -20,16 +21,33 @@ COPY Makefile /src/
COPY scripts /src/scripts COPY scripts /src/scripts
RUN make frontend RUN make frontend
FROM rust:latest as planner
RUN cargo install cargo-chef
WORKDIR /src
COPY . /src/
RUN cargo chef prepare --recipe-path recipe.json
FROM rust:latest as cacher
WORKDIR /src/
RUN cargo install cargo-chef
COPY --from=planner /src/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
FROM rust:latest as rust FROM rust:latest as rust
WORKDIR /src WORKDIR /src
COPY . . COPY . .
COPY --from=cacher /src/target target
#COPY --from=cacher /src/db/db-core/target /src/db/db-core/target
#COPY --from=cacher /src/db/db-sqlx-postgres/target /src/db/db-sqlx-postgres/target
#COPY --from=cacher /src/db/db-migrations/target /src/db/db-migrations/target
#COPY --from=cacher /src/utils/cache-bust/target /src/utils/cache-bust/target
COPY --from=frontend /src/static/cache/bundle/ /src/static/cache/bundle/ COPY --from=frontend /src/static/cache/bundle/ /src/static/cache/bundle/
COPY --from=frontend /src/docs/openapi/dist/ /src/docs/openapi/dist/ COPY --from=frontend /src/docs/openapi/dist/ /src/docs/openapi/dist/
RUN cargo --version RUN cargo --version
RUN make cache-bust RUN make cache-bust
RUN cargo build --release RUN cargo build --release
FROM debian:bookworm as mCaptcha FROM debian:bullseye as mCaptcha
LABEL org.opencontainers.image.source https://github.com/mCaptcha/mCaptcha LABEL org.opencontainers.image.source https://github.com/mCaptcha/mCaptcha
RUN useradd -ms /bin/bash -u 1001 mcaptcha RUN useradd -ms /bin/bash -u 1001 mcaptcha
WORKDIR /home/mcaptcha WORKDIR /home/mcaptcha