mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
feat: build and release docker images using github cicd
This commit is contained in:
parent
d17523ff17
commit
04dd2627cb
2 changed files with 49 additions and 0 deletions
44
.github/workflows/docker-release.yml
vendored
Normal file
44
.github/workflows/docker-release.yml
vendored
Normal file
|
|
@ -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
|
||||
|
|
@ -130,6 +130,11 @@ First, create an image from the Dockerfile<br>
|
|||
And then run it<br>
|
||||
`docker run -i -p 4748:4748 -t servatrice:latest`<br>
|
||||
|
||||
For versions after 2.10.2, there is also an official image available on the GitHub container registry. You can pull it using<br>
|
||||
`docker pull ghcr.io/Cockatrice/Cockatrice:latest`<br>
|
||||
And then run it<br>
|
||||
`docker run -i -p 4748:4748 -t ghcr.io/Cockatrice/Cockatrice:latest`<br>
|
||||
|
||||
>Note: Running this command exposes the port 4748 of the docker container<br>
|
||||
to permit connections to the server.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue