diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index fd23538..ca5d4a8 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -14,7 +14,7 @@ jobs: build: runs-on: ubuntu-latest permissions: - contents: read + contents: write packages: write steps: @@ -31,15 +31,21 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Generate tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + default_bump: patch + release_branches: main + - name: Extract metadata id: meta uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=ref,event=branch - type=ref,event=pr - type=sha,prefix=sha- + type=raw,value=${{ steps.tag_version.outputs.new_tag }} type=raw,value=latest,enable={{is_default_branch}} - name: Build and push Docker image diff --git a/Dockerfile b/Dockerfile index 92a5e40..5231ba4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,11 @@ FROM python:3.12-slim WORKDIR /app # Copy requirements first for better caching (if you have any) -# COPY requirements.txt . -# RUN pip install --no-cache-dir -r requirements.txt +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY main.py . # Default command: run the Python application -CMD [ "python", "main.py" ] \ No newline at end of file +CMD ["tail", "-f", "/dev/null"] \ No newline at end of file diff --git a/compose.yaml b/compose.yaml deleted file mode 100644 index 8e1c032..0000000 --- a/compose.yaml +++ /dev/null @@ -1,11 +0,0 @@ -services: - test_deployment: - build: . - image: test_deployment:latest - container_name: test_deployment - volumes: - - .:/workspace - tty: true - working_dir: /workspace - command: ["bash"] - # Uncomment the following line if you want to run a specific command on startup \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..f1856dd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +numpy==2.3.2 +pandas==2.3.1 +python-dateutil==2.9.0.post0 +pytz==2025.2 +six==1.17.0 +tzdata==2025.2 \ No newline at end of file