diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 000000000..7b3e05567 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,44 @@ +name: build & push docker container +on: + push: + tags: + - '*Release*' + pull_request: + branches: + - master +jobs: + docker: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Docker meta + id: metal + uses: docker/metadata-action@v5 + with: + images: | + ghcr.io/${{ github.repository }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ github.token }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64,linux/arm64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.metal.outputs.tags }} + labels: ${{ steps.metal.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/README.md b/README.md index f7fffdedf..1a0a6de37 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,11 @@ First, create an image from the Dockerfile
And then run it
`docker run -i -p 4748:4748 -t servatrice:latest`
+For versions after 2.10.2, there is also an official image available on the GitHub container registry. You can pull it using
+`docker pull ghcr.io/Cockatrice/Cockatrice:latest`
+And then run it
+`docker run -i -p 4748:4748 -t ghcr.io/Cockatrice/Cockatrice:latest`
+ >Note: Running this command exposes the port 4748 of the docker container
to permit connections to the server.