feat: 更新文档,添加 GitHub API 轮询和自定义模板系统设计概要,修改安装和部署说明 #32
This file contains hidden or 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
| name: Docker Image CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| paths: | |
| - 'Dockerfile' | |
| - '.github/workflows/docker-image.yml' | |
| - 'main.py' | |
| - 'requirements.txt' | |
| - 'app/**' | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ "master" ] | |
| paths: | |
| - 'Dockerfile' | |
| - '.github/workflows/docker-image.yml' | |
| - 'main.py' | |
| - 'requirements.txt' | |
| - 'app/**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: | | |
| e1saps/onebot-github-webhook:latest | |
| ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && format('e1saps/onebot-github-webhook:{0}', github.ref_name) || format('e1saps/onebot-github-webhook:{0}', github.sha) }} |