Skip to content

Commit

Permalink
Refactor GitHub Actions workflows for improved readability and mainta…
Browse files Browse the repository at this point in the history
…inability
  • Loading branch information
ursisterbtw committed Dec 9, 2024
1 parent d05a49b commit 3c57aec
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Python CI

permissions:
contents: read

on:
push:
branches: ["master"]
branches: [master]
pull_request:
branches: ["master"]
branches: [master]

jobs:
test:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: rust-clippy analyze

on:
push:
branches: ["master"]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: ["master"]
branches: [master]
schedule:
- cron: "39 12 * * 4"
- cron: 39 12 * * 4

permissions: read-all

jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Rust CI

permissions: read-all

on:
push:
branches: ["master"]
branches: [master]
pull_request:
branches: ["master"]
branches: [master]

env:
CARGO_TERM_COLOR: always
Expand All @@ -15,7 +17,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Cache Cargo registry
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ secrets
*.log
**/gen/*.json
.build-metrics.db
.trunk
# Temp Ignore

0 comments on commit 3c57aec

Please sign in to comment.