Merge pull request #106 from AlienFamilyHub/dependabot/npm_and_yarn/a… #45
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: Build and Push tapi Docker Image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: # 允许手动触发 | |
| env: | |
| REGISTRY_IMAGE: ghcr.io/alienfamilyhub/tapi | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: 检出仓库 | |
| uses: actions/checkout@v4 | |
| - name: 设置 Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: 登录到 GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 构建并推送 Docker 镜像 | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| dockerfile: Dockerfile | |
| push: true | |
| tags: ${{ env.REGISTRY_IMAGE }}:latest |