⬆️ auto update by pre-commit hooks #118
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 docker image | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| release: | |
| types: [published] | |
| jobs: | |
| push_to_registry: | |
| name: Push Docker image to GitHub Packages | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v3 | |
| - name: Setup Docker | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Github Container Registry | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Generate Tags | |
| uses: docker/metadata-action@v4 | |
| id: metadata | |
| with: | |
| images: ghcr.io/nonepkg/nonebot-all4one | |
| - name: Build and Publish | |
| uses: docker/build-push-action@v3 | |
| with: | |
| file: ./docker/Dockerfile | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.metadata.outputs.tags }} | |
| labels: ${{ steps.metadata.outputs.labels }} | |
| platforms: linux/amd64, linux/arm64 |