Skip to content

Commit

Permalink
Debug docker build pipeline
Browse files Browse the repository at this point in the history
Debug docker build pipeline

Debug docker build pipeline

Debug docker build pipeline

Debug docker build pipeline

Debug docker build pipeline

Debug docker build pipeline

Debug docker build pipeline

Docker image publish pipeline
  • Loading branch information
daya0576 committed Sep 22, 2024
1 parent 4bb6e49 commit 8ed3f0e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=daya0576/beaverhabits
VERSION=${GITHUB_REF#refs/tags/v}
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"
DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest"
fi
echo $TAGS
echo ::set-output name=tags::${TAGS}
echo ::set-output name=docker_image::${DOCKER_IMAGE}
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -56,9 +59,9 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/amd64/v3,linux/arm64,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/amd64/v3,linux/arm64
push: true
tags: ${{ steps.prep.outputs.tags }}
tags: ${{ steps.prep.outputs.tags }}

verify:
needs: docker
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ RUN pip install --no-cache-dir -r requirements.txt

COPY start.sh .
COPY beaverhabits ./beaverhabits
RUN mkdir .user

CMD ["sh", "start.sh", "prd"]
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ docker run -d --name beaverhabits \

Options:

- **HABITS_STORAGE**(str): `DATABASE`(default), `USER_DISK`
- **DATABASE_URL**(str): The database url for storage backend, e.g. `sqlite:///habits.db`
- **FIRST_DAY_OF_WEEK**(int): `0`(default), `6`
| Name | Description |
| :------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **HABITS_STORAGE**(str) | The `DATABASE` option stores everything in a single SQLite database file named habits.db. On the other hand, the `USER_DISK` option saves habits and records in a local json file. |
| **FIRST_DAY_OF_WEEK**(int) | By default, the first day of the week is set as Monday. To change it to Sunday, you can set it as `6`. |
| **MAX_USER_COUNT**(int) | By setting it to `1`, you can prevent others from signing up in the future. |

# Features

Expand Down

0 comments on commit 8ed3f0e

Please sign in to comment.