mirror of
https://github.com/DRYTRIX/TimeTracker.git
synced 2026-01-06 03:30:25 -06:00
Update docker-publish.yml
This commit is contained in:
50
.github/workflows/docker-publish.yml
vendored
50
.github/workflows/docker-publish.yml
vendored
@@ -56,6 +56,19 @@ jobs:
|
||||
|
||||
echo "--- Created Dockerfile.simple ---"
|
||||
cat Dockerfile.simple
|
||||
|
||||
echo "--- Checking available files ---"
|
||||
pwd
|
||||
ls -la
|
||||
echo "--- Checking if requirements.txt exists ---"
|
||||
if [ -f requirements.txt ]; then
|
||||
echo "requirements.txt found:"
|
||||
cat requirements.txt
|
||||
else
|
||||
echo "requirements.txt NOT found!"
|
||||
echo "Available .txt files:"
|
||||
find . -name "*.txt" -type f
|
||||
fi
|
||||
|
||||
- name: Build and push Docker image
|
||||
run: |
|
||||
@@ -68,41 +81,4 @@ jobs:
|
||||
docker push ghcr.io/drytrix/timetracker:main
|
||||
fi
|
||||
|
||||
# Multi-platform manifest job
|
||||
manifest:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'pull_request'
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
|
||||
- name: Create and push manifest
|
||||
run: |
|
||||
# Create a simple Dockerfile for this job
|
||||
cat > Dockerfile.simple << 'EOF'
|
||||
FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY . .
|
||||
EXPOSE 8080
|
||||
CMD ["python", "app.py"]
|
||||
EOF
|
||||
|
||||
# Build and push with latest tag
|
||||
docker build -f Dockerfile.simple -t ghcr.io/drytrix/timetracker:latest .
|
||||
docker push ghcr.io/drytrix/timetracker:latest
|
||||
|
||||
Reference in New Issue
Block a user