-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: bpro <iserver12345@gmail.com>
- Loading branch information
1 parent
5f59447
commit 317f329
Showing
6 changed files
with
180 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "Build Docker image" | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
build-docker: | ||
name: "🐳 Build and publish Docker image" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v2 | ||
|
||
- name: "❓ Find the release semantic version" | ||
id: semver | ||
uses: Steffo99/actions-semver@v0.1.0 | ||
|
||
- name: "🔨 Setup Buildx" | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: "🔑 Login to GitHub Containers" | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: RYGhub | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "🏗 Build and push the Docker image" | ||
uses: docker/build-push-action@v2 | ||
with: | ||
tags: >- | ||
ghcr.io/Steffo99/greed:${{ steps.semver.outputs.full }}, | ||
ghcr.io/Steffo99/greed:${{ steps.semver.outputs.patch }}, | ||
ghcr.io/Steffo99/greed:${{ steps.semver.outputs.minor }}, | ||
ghcr.io/Steffo99/greed:${{ steps.semver.outputs.major }}, | ||
ghcr.io/Steffo99/greed:latest | ||
push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,3 +105,4 @@ config/config.ini | |
config/config.toml | ||
*.sqlite | ||
*.sqlite-journal | ||
data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM python:3.10 AS labels | ||
LABEL maintainer="Stefano Pigozzi <me@steffo.eu>" | ||
LABEL description="A customizable, multilanguage Telegram shop bot" | ||
|
||
FROM labels AS dependencies | ||
COPY requirements.txt ./requirements.txt | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
FROM dependencies AS greed | ||
COPY . /usr/src/greed | ||
WORKDIR /usr/src/greed | ||
|
||
FROM greed AS entry | ||
ENTRYPOINT ["python", "-OO"] | ||
CMD ["core.py"] | ||
|
||
FROM entry AS environment | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV CONFIG_PATH="/etc/greed/config.toml" | ||
ENV DB_ENGINE="sqlite:////var/lib/greed/database.sqlite" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters