- Notifications
You must be signed in to change notification settings - Fork965
focus bug fix#220
Workflow file for this run
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 release | |
| on: | |
| push: | |
| tags: | |
| -"v*.*.*" | |
| pull_request: | |
| branches: | |
| -master | |
| concurrency: | |
| group:${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress:true | |
| jobs: | |
| build-docker-images: | |
| if:${{ !github.event.pull_request.head.repo.fork }} | |
| runs-on:ubuntu-latest | |
| steps: | |
| -name:Checkout repository | |
| uses:actions/checkout@v6 | |
| -name:Downcase repo | |
| run:echo REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV | |
| -name:Docker meta | |
| id:docker_meta | |
| uses:docker/metadata-action@v5 | |
| with: | |
| images:| | |
| ${{ env.REPOSITORY }},enable=${{ github.event_name != 'pull_request' }} | |
| ghcr.io/${{ env.REPOSITORY }} | |
| tags:| | |
| type=semver,pattern={{version}},prefix=v | |
| type=ref,event=pr | |
| flavor:| | |
| latest=auto | |
| -name:Set up QEMU | |
| uses:docker/setup-qemu-action@v3 | |
| -name:Set up Docker Buildx | |
| uses:docker/setup-buildx-action@v3 | |
| -name:Login to DockerHub | |
| if:github.event_name != 'pull_request' | |
| uses:docker/login-action@v3 | |
| with: | |
| username:${{ secrets.DOCKERHUB_USERNAME }} | |
| password:${{ secrets.DOCKERHUB_TOKEN }} | |
| -name:Login to GitHub Container Registry | |
| uses:docker/login-action@v3 | |
| with: | |
| registry:ghcr.io | |
| username:${{ github.repository_owner }} | |
| password:${{ secrets.GH_PAT }} | |
| -name:Build and push | |
| uses:docker/build-push-action@v6 | |
| with: | |
| context:. | |
| file:./Dockerfile | |
| platforms:linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8 | |
| push:true | |
| tags:${{ steps.docker_meta.outputs.tags }} | |
| labels:${{ steps.docker_meta.outputs.labels }} |