Skip to content

Commit

Permalink
ci: 直接编译好可以使用的镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Feb 7, 2022
1 parent 2614f0f commit 1469835
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ name: Docker Image

on:
push:
paths:
- 'poetry.lock'
branches:
- "main"
release:
types: [published]
workflow_dispatch:

jobs:
docker:
Expand All @@ -33,7 +32,7 @@ jobs:
images: ghcr.io/nonebot/nonebot2-publish-bot
tags: |
type=semver,pattern={{version}}
type=sha
type=ref,event=branch
- name: Build and Publish
uses: docker/build-push-action@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: NoneBot2 Publish Bot
uses: nonebot/nonebot2-publish-bot@main
uses: docker://ghcr.io/nonebot/nonebot2-publish-bot:main
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: >
Expand Down
5 changes: 5 additions & 0 deletions base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,8 @@ COPY --from=requirements-stage /tmp/requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

RUN rm requirements.txt

COPY ./main.py /app/
COPY ./src /app/src

CMD ["python", "/app/main.py"]

0 comments on commit 1469835

Please sign in to comment.