name: Docker build on: push: branches: [main] jobs: build: runs-on: ubuntu-latest concurrency: group: ${{ github.ref }} cancel-in-progress: true steps: - uses: actions/checkout@v2 - uses: docker/login-action@v1 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - uses: docker/setup-qemu-action@v2 - uses: docker/setup-buildx-action@v2 - name: Build the Docker image run: | docker buildx build \ -t ghcr.io/${{ github.repository_owner }}/snort:latest \ --platform linux/amd64,linux/arm64 \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache" \ --push .