name: build-docker on: push: branches: - '**' - '!screen-enhance' - '!screen-enhance/**' tags: - 'v*.*.*' - 'v*.*' jobs: build: name: Build Image runs-on: ubuntu-latest permissions: contents: read packages: write steps: - name: Checkout uses: actions/checkout@v4 - name: Docker meta id: meta uses: docker/metadata-action@v5 with: images: | ghcr.io/netbymatt/ws4kp flavor: | latest=false tags: | type=raw,priority=1000,value=latest,enable=${{ github.ref == 'refs/heads/main' }} type=ref,event=branch type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Buildx uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Push id: docker_build uses: docker/build-push-action@v6 with: context: . pull: true push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }} platforms: linux/amd64,linux/arm64/v8 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max