ci: improve gh actions with path-based triggers

This commit is contained in:
Marco Cadetg
2025-09-11 11:47:49 +02:00
parent e26e944a1f
commit 4ecda96d68
3 changed files with 35 additions and 7 deletions

View File

@@ -4,6 +4,7 @@
# Git
.git/
.gitignore
.dockerignore
# IDE
.vscode/
@@ -20,19 +21,14 @@ README.md
CHANGELOG.md
ROADMAP.md
LICENSE
reddit_rust_post.md
RELEASE.md
rustnet-0.1.0.tar.gz
rustnet-*.tar.gz
# Assets we don't need in container
assets/rustnet.gif
# Claude Code
.claude/
CLAUDE.md
# Scripts (not needed in container)
scripts/
# CI/CD (already in repo context)
.github/
.github/

View File

@@ -3,9 +3,26 @@ name: Docker Build and Publish
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'assets/services'
- 'Dockerfile'
- 'build.rs'
- '.github/workflows/docker.yml'
tags: [ "v*.*.*" ]
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'assets/services'
- 'Dockerfile'
- 'build.rs'
- '.github/workflows/docker.yml'
workflow_dispatch:
env:
REGISTRY: ghcr.io

View File

@@ -3,8 +3,23 @@ name: Rust
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'assets/services'
- 'build.rs'
- '.github/workflows/rust.yml'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'assets/services'
- 'build.rs'
- '.github/workflows/rust.yml'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always