@@ -14,65 +14,23 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
echo "=== Gitea Actions Checkout ==="
|
||||
echo "=== Repository Checkout ==="
|
||||
echo "Repository: ${{ github.repository }}"
|
||||
echo "Ref: ${{ github.ref }}"
|
||||
echo "SHA: ${{ github.sha }}"
|
||||
echo "Workspace: ${{ github.workspace }}"
|
||||
|
||||
# In Gitea Actions, the code might already be available
|
||||
# Let's check what's in the workspace
|
||||
cd ${{ github.workspace }}
|
||||
pwd
|
||||
ls -la
|
||||
|
||||
# If the repository is not already checked out, try multiple approaches
|
||||
if [ ! -f "README.md" ]; then
|
||||
echo "Repository not found, trying multiple git clone approaches..."
|
||||
# Configure git for better compatibility with SSL issues
|
||||
git config --global http.sslverify false
|
||||
git config --global http.postBuffer 524288000
|
||||
|
||||
# Configure git for better compatibility
|
||||
git config --global http.sslverify false
|
||||
git config --global http.postBuffer 524288000
|
||||
git config --global http.maxRequestBuffer 100M
|
||||
git config --global core.compression 0
|
||||
# Clone the repository
|
||||
git clone --depth 1 https://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git .
|
||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD commit"
|
||||
|
||||
# Try HTTPS first with more relaxed settings
|
||||
echo "Attempting HTTPS clone..."
|
||||
if ! git clone --depth 1 https://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git . 2>/dev/null; then
|
||||
echo "HTTPS failed, trying HTTP..."
|
||||
# Clean up any partial clone
|
||||
rm -rf .git
|
||||
# Try HTTP instead
|
||||
if ! git clone --depth 1 http://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git . 2>/dev/null; then
|
||||
echo "Both HTTPS and HTTP failed. Repository might need manual setup."
|
||||
echo "Creating minimal repository structure for testing..."
|
||||
|
||||
# Configure git user for commits
|
||||
git config --global user.email "ci@gitea-actions.local"
|
||||
git config --global user.name "Gitea Actions CI"
|
||||
|
||||
# Create basic structure so tests can at least try to run
|
||||
mkdir -p backend/src/backend backend/tests frontend/src
|
||||
echo "# Plex Playlist" > README.md
|
||||
echo "__version__ = '0.1.0'" > backend/src/backend/__init__.py
|
||||
touch backend/src/backend/main.py
|
||||
echo "def test_placeholder(): pass" > backend/tests/test_basic.py
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Temporary structure for CI"
|
||||
else
|
||||
echo "HTTP clone successful"
|
||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD instead of specific SHA"
|
||||
fi
|
||||
else
|
||||
echo "HTTPS clone successful"
|
||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD instead of specific SHA"
|
||||
fi
|
||||
else
|
||||
echo "Repository already available in workspace"
|
||||
fi
|
||||
|
||||
echo "Final repository state:"
|
||||
echo "Repository contents:"
|
||||
ls -la
|
||||
|
||||
- name: Install Python 3.13
|
||||
@@ -153,65 +111,23 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
run: |
|
||||
echo "=== Gitea Actions Checkout ==="
|
||||
echo "=== Repository Checkout ==="
|
||||
echo "Repository: ${{ github.repository }}"
|
||||
echo "Ref: ${{ github.ref }}"
|
||||
echo "SHA: ${{ github.sha }}"
|
||||
echo "Workspace: ${{ github.workspace }}"
|
||||
|
||||
# In Gitea Actions, the code might already be available
|
||||
# Let's check what's in the workspace
|
||||
cd ${{ github.workspace }}
|
||||
pwd
|
||||
ls -la
|
||||
|
||||
# If the repository is not already checked out, try multiple approaches
|
||||
if [ ! -f "README.md" ]; then
|
||||
echo "Repository not found, trying multiple git clone approaches..."
|
||||
# Configure git for better compatibility with SSL issues
|
||||
git config --global http.sslverify false
|
||||
git config --global http.postBuffer 524288000
|
||||
|
||||
# Configure git for better compatibility
|
||||
git config --global http.sslverify false
|
||||
git config --global http.postBuffer 524288000
|
||||
git config --global http.maxRequestBuffer 100M
|
||||
git config --global core.compression 0
|
||||
# Clone the repository
|
||||
git clone --depth 1 https://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git .
|
||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD commit"
|
||||
|
||||
# Try HTTPS first with more relaxed settings
|
||||
echo "Attempting HTTPS clone..."
|
||||
if ! git clone --depth 1 https://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git . 2>/dev/null; then
|
||||
echo "HTTPS failed, trying HTTP..."
|
||||
# Clean up any partial clone
|
||||
rm -rf .git
|
||||
# Try HTTP instead
|
||||
if ! git clone --depth 1 http://dogar.darkhelm.org/DarkHelm.org/plex-playlist.git . 2>/dev/null; then
|
||||
echo "Both HTTPS and HTTP failed. Repository might need manual setup."
|
||||
echo "Creating minimal repository structure for testing..."
|
||||
|
||||
# Configure git user for commits
|
||||
git config --global user.email "ci@gitea-actions.local"
|
||||
git config --global user.name "Gitea Actions CI"
|
||||
|
||||
# Create basic structure so tests can at least try to run
|
||||
mkdir -p backend/src/backend backend/tests frontend/src
|
||||
echo "# Plex Playlist" > README.md
|
||||
echo "__version__ = '0.1.0'" > backend/src/backend/__init__.py
|
||||
touch backend/src/backend/main.py
|
||||
echo "def test_placeholder(): pass" > backend/tests/test_basic.py
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Temporary structure for CI"
|
||||
else
|
||||
echo "HTTP clone successful"
|
||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD instead of specific SHA"
|
||||
fi
|
||||
else
|
||||
echo "HTTPS clone successful"
|
||||
git checkout ${{ github.sha }} 2>/dev/null || echo "Using HEAD instead of specific SHA"
|
||||
fi
|
||||
else
|
||||
echo "Repository already available in workspace"
|
||||
fi
|
||||
|
||||
echo "Final repository state:"
|
||||
echo "Repository contents:"
|
||||
ls -la
|
||||
|
||||
- name: Install Node.js 24
|
||||
|
||||
Reference in New Issue
Block a user