Merge pull request 'Merge dev in testing: Passt Workflows, README und Dependencys an' (#27) from dev into testing
Testing Build, Publish & Preview Release / Build, Publish Packages (Testing) & Create Preview Release (push) Successful in 6m59s
TruffleHog Secret Scan / TruffleHog (pull_request) Successful in 29s
Security Scans / Trivy & OSV-Scanner (push) Successful in 49s
TruffleHog Secret Scan / TruffleHog (push) Successful in 15s
Security Scans / Trivy & OSV-Scanner (pull_request) Successful in 53s
Unit-Tests / Unit-Tests (pull_request) Skipped
Testing Build, Publish & Preview Release / Erkenne relevante Code-Änderungen (push) Successful in 12s
Testing Build, Publish & Preview Release / Build, Publish Packages (Testing) & Create Preview Release (push) Successful in 6m59s
TruffleHog Secret Scan / TruffleHog (pull_request) Successful in 29s
Security Scans / Trivy & OSV-Scanner (push) Successful in 49s
TruffleHog Secret Scan / TruffleHog (push) Successful in 15s
Security Scans / Trivy & OSV-Scanner (pull_request) Successful in 53s
Unit-Tests / Unit-Tests (pull_request) Skipped
Testing Build, Publish & Preview Release / Erkenne relevante Code-Änderungen (push) Successful in 12s
Reviewed-on: #27
This commit was merged in pull request #27.
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
name: Code Quality (Auto-Format & Clippy-Fix)
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fix:
|
||||||
|
name: Formatierung & Clippy automatisch beheben
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
with:
|
||||||
|
ref: ${{ gitea.ref_name || github.ref_name }}
|
||||||
|
token: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||||
|
|
||||||
|
- name: Install Rust Toolchain
|
||||||
|
uses: actions-rust-lang/setup-rust-toolchain@v2
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
components: clippy, rustfmt
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
- name: Cache Cargo-Abhängigkeiten & Build-Artefakte
|
||||||
|
uses: actions/cache@v6
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
cargo-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Formatierung automatisch beheben
|
||||||
|
run: cargo fmt
|
||||||
|
|
||||||
|
- name: Clippy-Fixes automatisch anwenden
|
||||||
|
run: cargo clippy --fix --allow-dirty --allow-staged --all-targets
|
||||||
|
|
||||||
|
- name: Änderungen committen & pushen
|
||||||
|
run: |
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
git config user.name "Gitea-Bot"
|
||||||
|
git config user.email "no-reply@creativedragonslayer.de"
|
||||||
|
git add -A
|
||||||
|
git commit -m "Style: Automatische Formatierung & Clippy-Fixes"
|
||||||
|
git push origin HEAD:${{ gitea.ref_name || github.ref_name }}
|
||||||
|
else
|
||||||
|
echo "Keine Formatierungs- oder Clippy-Änderungen."
|
||||||
|
fi
|
||||||
@@ -6,8 +6,32 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
detect-changes:
|
||||||
|
name: Erkenne relevante Code-Änderungen
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
code_changed: ${{ steps.filter.outputs.code }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Prüfe auf Änderungen am Programmcode
|
||||||
|
uses: dorny/paths-filter@v4
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
code:
|
||||||
|
- 'src/**'
|
||||||
|
- 'Cargo.toml'
|
||||||
|
- 'Cargo.lock'
|
||||||
|
- 'scripts/**'
|
||||||
|
- '.cargo/**'
|
||||||
|
- '.gitea/workflows/main.yaml'
|
||||||
|
|
||||||
release-and-publish:
|
release-and-publish:
|
||||||
name: Build, Publish Packages (Stable) & Create Release
|
name: Build, Publish Packages (Stable) & Create Release
|
||||||
|
needs: detect-changes
|
||||||
|
if: needs.detect-changes.outputs.code_changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CARGO_BINSTALL_VERSION: "1.23.0"
|
CARGO_BINSTALL_VERSION: "1.23.0"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
renovate:
|
renovate:
|
||||||
name: Dependency-Updates prüfen & Pull Requests erstellen
|
name: Dependency-Updates prüfen & Pull Requests erstellen
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/renovatebot/renovate:44.82.0
|
container: ghcr.io/renovatebot/renovate:44.82.3
|
||||||
steps:
|
steps:
|
||||||
- name: Renovate ausführen
|
- name: Renovate ausführen
|
||||||
run: renovate
|
run: renovate
|
||||||
@@ -19,6 +19,7 @@ jobs:
|
|||||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||||
RENOVATE_REPOSITORIES: ${{ gitea.repository || github.repository }}
|
RENOVATE_REPOSITORIES: ${{ gitea.repository || github.repository }}
|
||||||
RENOVATE_AUTODISCOVER: "false"
|
RENOVATE_AUTODISCOVER: "false"
|
||||||
|
RENOVATE_ALLOW_CUSTOM_CRATE_REGISTRIES: "true"
|
||||||
RENOVATE_GIT_AUTHOR: "Renovate Bot <renovate-bot@creativedragonslayer.de>"
|
RENOVATE_GIT_AUTHOR: "Renovate Bot <renovate-bot@creativedragonslayer.de>"
|
||||||
RENOVATE_HOST_RULES: >-
|
RENOVATE_HOST_RULES: >-
|
||||||
[{"hostType":"cargo","matchHost":"${{ gitea.server_url || github.server_url }}","token":"${{ secrets.RENOVATE_TOKEN }}"}]
|
[{"hostType":"cargo","matchHost":"${{ gitea.server_url || github.server_url }}","token":"${{ secrets.RENOVATE_TOKEN }}"}]
|
||||||
|
|||||||
@@ -6,8 +6,32 @@ on:
|
|||||||
- testing
|
- testing
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
detect-changes:
|
||||||
|
name: Erkenne relevante Code-Änderungen
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
code_changed: ${{ steps.filter.outputs.code }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
|
- name: Prüfe auf Änderungen am Programmcode
|
||||||
|
uses: dorny/paths-filter@v4
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
filters: |
|
||||||
|
code:
|
||||||
|
- 'src/**'
|
||||||
|
- 'Cargo.toml'
|
||||||
|
- 'Cargo.lock'
|
||||||
|
- 'scripts/**'
|
||||||
|
- '.cargo/**'
|
||||||
|
- '.gitea/workflows/testing.yaml'
|
||||||
|
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
name: Build, Publish Packages (Testing) & Create Preview Release
|
name: Build, Publish Packages (Testing) & Create Preview Release
|
||||||
|
needs: detect-changes
|
||||||
|
if: needs.detect-changes.outputs.code_changed == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
CARGO_BINSTALL_VERSION: "1.23.0"
|
CARGO_BINSTALL_VERSION: "1.23.0"
|
||||||
|
|||||||
Generated
+3
@@ -29,6 +29,9 @@
|
|||||||
<Item>
|
<Item>
|
||||||
<option name="path" value=".gitea/workflows/unit-tests.yaml" />
|
<option name="path" value=".gitea/workflows/unit-tests.yaml" />
|
||||||
</Item>
|
</Item>
|
||||||
|
<Item>
|
||||||
|
<option name="path" value=".gitea/workflows/code-quality.yaml" />
|
||||||
|
</Item>
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</SchemaInfo>
|
</SchemaInfo>
|
||||||
|
|||||||
Generated
+5
-5
@@ -76,7 +76,7 @@ checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "docker-update"
|
name = "docker-update"
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"config-ctdra",
|
"config-ctdra",
|
||||||
"logger-ctdra",
|
"logger-ctdra",
|
||||||
@@ -122,9 +122,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "granit-parser"
|
name = "granit-parser"
|
||||||
version = "1.1.0"
|
version = "1.2.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ccd1be9ebf2bd5520dbfcfb72b70ef492f654061299a097056f3e73410e38ec"
|
checksum = "48aa83cc6ac4dc610adf5501a5392b4bcc543b2c1f24eaf77469a96e31ec9abe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arraydeque",
|
"arraydeque",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
@@ -261,9 +261,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde-saphyr"
|
name = "serde-saphyr"
|
||||||
version = "1.1.0"
|
version = "1.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a1ec1f5cac0eb96063c64b28705255a7ed6e7d77f95c1d25e9f8b8c928006ce1"
|
checksum = "3afb591f9cdb6223c88ba39269aff895620c7f0716dc42b705b5733d5c7c0823"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"annotate-snippets",
|
"annotate-snippets",
|
||||||
"base64",
|
"base64",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "docker-update"
|
name = "docker-update"
|
||||||
version = "1.2.1"
|
version = "1.2.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ['DragonSlayer_14']
|
authors = ['DragonSlayer_14']
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
# DockerUpdate (`docker-update`)
|
# DockerUpdate (`docker-update`)
|
||||||
|
|
||||||
|
[](https://gitea.creative-dragonslayer.de/Linuxapps/DockerUpdate/actions?workflow=main.yaml)
|
||||||
|
[](https://gitea.creative-dragonslayer.de/Linuxapps/DockerUpdate/actions?workflow=testing.yaml)
|
||||||
|
|
||||||
`docker-update` ist ein schlankes CLI-Werkzeug für Linux-Server, das Docker-Compose-basierte Applikationen automatisch
|
`docker-update` ist ein schlankes CLI-Werkzeug für Linux-Server, das Docker-Compose-basierte Applikationen automatisch
|
||||||
auf neuere Versionen prüft, aktualisiert und neu startet.
|
auf neuere Versionen prüft, aktualisiert und neu startet.
|
||||||
|
|
||||||
|
|||||||
+1
-9
@@ -7,20 +7,12 @@ use config_ctdra::get_config as get_cached_config;
|
|||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// Hauptkonfigurationsstruktur der Anwendung.
|
/// Hauptkonfigurationsstruktur der Anwendung.
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Default)]
|
||||||
pub struct AppConfig {
|
pub struct AppConfig {
|
||||||
/// Allgemeine Einstellungen
|
/// Allgemeine Einstellungen
|
||||||
pub general: General,
|
pub general: General,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for AppConfig {
|
|
||||||
fn default() -> Self {
|
|
||||||
Self {
|
|
||||||
general: General::default(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Allgemeine Konfigurationseinstellungen.
|
/// Allgemeine Konfigurationseinstellungen.
|
||||||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
|
||||||
pub struct General {
|
pub struct General {
|
||||||
|
|||||||
+4
-5
@@ -111,14 +111,13 @@ pub fn run_compose_command(dir: &Path, args: &[&str]) -> std::io::Result<Output>
|
|||||||
|| stderr.contains("unknown command \"compose\"")
|
|| stderr.contains("unknown command \"compose\"")
|
||||||
|| stderr.contains("unknown command: compose"));
|
|| stderr.contains("unknown command: compose"));
|
||||||
|
|
||||||
if is_unavailable {
|
if is_unavailable
|
||||||
if let Ok(fallback_out) = Command::new("docker-compose")
|
&& let Ok(fallback_out) = Command::new("docker-compose")
|
||||||
.current_dir(dir)
|
.current_dir(dir)
|
||||||
.args(args)
|
.args(args)
|
||||||
.output()
|
.output()
|
||||||
{
|
{
|
||||||
return Ok(fallback_out);
|
return Ok(fallback_out);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ok(out)
|
Ok(out)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user