Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

name: Python CI

permissions:
contents: read

on:
push:
branches: [ master ]
Expand All @@ -15,6 +12,8 @@ on:
jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.1
Expand Down Expand Up @@ -44,6 +43,8 @@ jobs:
test:
needs: lint
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6.0.1
Expand Down Expand Up @@ -76,6 +77,8 @@ jobs:
coverage:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
# Only run coverage for PRs from the same repository (not forks)
# This ensures secrets are available for Codecov and Codacy
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
Expand Down
4 changes: 2 additions & 2 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ VOLUME_STORAGE_PATH="/storage/players-sqlite3.db"

echo "✔ Starting container..."

if [ ! -f "$VOLUME_STORAGE_PATH" ]; then
if [[ ! -f "$VOLUME_STORAGE_PATH" ]]; then
echo "⚠️ No existing database file found in volume."
if [ -f "$IMAGE_STORAGE_PATH" ]; then
if [[ -f "$IMAGE_STORAGE_PATH" ]]; then
echo "Copying database file to writable volume..."
cp "$IMAGE_STORAGE_PATH" "$VOLUME_STORAGE_PATH"
echo "✔ Database initialized at $VOLUME_STORAGE_PATH"
Expand Down