mirror of
https://github.com/StefBuwalda/cal_counter.git
synced 2025-10-30 11:19:59 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb160d364a | ||
| fdf264b9c5 | |||
| 91595ccc11 | |||
| 6c01c6a923 |
13
.github/workflows/docker-ghcr.yml
vendored
13
.github/workflows/docker-ghcr.yml
vendored
@@ -14,9 +14,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# Checkout code
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4.2.2
|
uses: actions/checkout@v4.2.2
|
||||||
|
|
||||||
|
# Log in to GHCR
|
||||||
- name: Log in to GitHub Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3.5.0
|
uses: docker/login-action@v3.5.0
|
||||||
with:
|
with:
|
||||||
@@ -24,13 +26,22 @@ jobs:
|
|||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# Set up Docker Buildx (needed for ARM64 cross-build)
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3.11.1
|
uses: docker/setup-buildx-action@v3.11.1
|
||||||
|
|
||||||
|
# Build and push Docker image with caching
|
||||||
- name: Build and push ARM64 image
|
- name: Build and push ARM64 image
|
||||||
uses: docker/build-push-action@v6.18.0
|
uses: docker/build-push-action@v6.18.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
tags: ghcr.io/stefbuwalda/cal_counter:arm64,ghcr.io/stefbuwalda/cal_counter:latest
|
tags: |
|
||||||
|
ghcr.io/stefbuwalda/cal_counter:arm64
|
||||||
|
ghcr.io/stefbuwalda/cal_counter:latest
|
||||||
|
cache-from: type=registry,ref=ghcr.io/stefbuwalda/cal_counter:cache
|
||||||
|
cache-to: type=registry,ref=ghcr.io/stefbuwalda/cal_counter:cache,mode=max
|
||||||
|
build-args: |
|
||||||
|
PIP_NO_CACHE_DIR=1
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,13 @@ FROM python:3.12-slim
|
|||||||
|
|
||||||
# Everything will be done in /app (Not in the main OS Image)
|
# Everything will be done in /app (Not in the main OS Image)
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
RUN chmod +x ./entrypoint.sh
|
RUN chmod +x ./entrypoint.sh
|
||||||
|
|
||||||
ENV FLASK_APP=app.py
|
ENV FLASK_APP=app.py
|
||||||
|
|||||||
Reference in New Issue
Block a user