Skip to content

Commit 03597e1

Browse files
authored
Merge pull request #458 from nanotaboada/feature/sonarqube-findings-githubactions
chore: address SonarCloud code quality issues
2 parents b1f8891 + 77340ec commit 03597e1

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/python-app.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
name: Python CI
55

6-
permissions:
7-
contents: read
8-
96
on:
107
push:
118
branches: [ master ]
@@ -15,6 +12,8 @@ on:
1512
jobs:
1613
lint:
1714
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
1817
steps:
1918
- name: Checkout repository
2019
uses: actions/checkout@v6.0.1
@@ -44,6 +43,8 @@ jobs:
4443
test:
4544
needs: lint
4645
runs-on: ubuntu-latest
46+
permissions:
47+
contents: read
4748
steps:
4849
- name: Checkout repository
4950
uses: actions/checkout@v6.0.1
@@ -76,6 +77,8 @@ jobs:
7677
coverage:
7778
needs: test
7879
runs-on: ubuntu-latest
80+
permissions:
81+
contents: read
7982
# Only run coverage for PRs from the same repository (not forks)
8083
# This ensures secrets are available for Codecov and Codacy
8184
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository

scripts/entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ VOLUME_STORAGE_PATH="/storage/players-sqlite3.db"
66

77
echo "✔ Starting container..."
88

9-
if [ ! -f "$VOLUME_STORAGE_PATH" ]; then
9+
if [[ ! -f "$VOLUME_STORAGE_PATH" ]]; then
1010
echo "⚠️ No existing database file found in volume."
11-
if [ -f "$IMAGE_STORAGE_PATH" ]; then
11+
if [[ -f "$IMAGE_STORAGE_PATH" ]]; then
1212
echo "Copying database file to writable volume..."
1313
cp "$IMAGE_STORAGE_PATH" "$VOLUME_STORAGE_PATH"
1414
echo "✔ Database initialized at $VOLUME_STORAGE_PATH"

0 commit comments

Comments
 (0)