Skip to content

Commit 8c69bd8

Browse files
committed
Pass DATABASE_URL into build environment
1 parent df9fdf1 commit 8c69bd8

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@ jobs:
6262
password: ${{ secrets.GITHUB_TOKEN }}
6363

6464
- name: Build and push Docker images
65-
id: build
6665
uses: docker/build-push-action@v6
66+
env:
67+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
6768
with:
69+
secret-envs: database-url=DATABASE_URL
6870
push: true
6971
provenance: mode=max
7072
sbom: true

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY resources/gacha_py-2.0.0-py3-none-any.whl resources/
1313
COPY requirements.txt schema.prisma ./
1414
RUN pip install -r requirements.txt
1515

16-
RUN --mount=type=secret,target=.env \
16+
RUN --mount=type=secret,id=database-url,env=DATABASE_URL,required=true \
1717
prisma db push
1818

1919
COPY . .

arabot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from dotenv import load_dotenv
44

5-
__version__ = "8.23.2"
5+
__version__ = "8.23.3"
66

77
load_dotenv()
88
TESTING = bool(getenv("TESTING"))

tools/docker-build.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
docker build --secret=id=.env -t tooruu/arabot .
1+
docker build --secret=id=database-url,env=DATABASE_URL -t tooruu/arabot .

0 commit comments

Comments
 (0)