Dishorde icon indicating copy to clipboard operation
Dishorde copied to clipboard

Publish container image on release

Open AshCorr opened this issue 8 months ago • 1 comments

What does this PR do?

This PR adds a new Github Actions workflow that builds and publishes a multi-platform container image every time a new release is published.

It looks like there was a previous attempt to do this in #133 but its been stale since 2023 so I'm picking this up again in a new PR. I've deviated a bit from that previous PR, primarily that this PR doesn't have an Entrypoint script which sets up a config.json file from environment variables.


Why?

I currently host my 7DTD server on a Kubernetes cluster using https://github.com/vinanrra/Docker-7DaysToDie to manage my dedicated server. I'd love to be able to use this bot to send messages to my discord server but find it hard to set it up alongside my server when it doesn't have a container image that I can run.

{5F7F7685-25BF-46FB-A9AF-D607F2A28CC5}


Closes #133

AshCorr avatar Apr 23 '25 12:04 AshCorr

All looks good here. I have just one super teeny nitpick with the casing of 'FROM' and 'as' in the Dockerfile. This also causes a warning to be thrown out during build:

$ sudo docker build .
[+] Building 3.1s (12/12) FINISHED                               docker:default
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 432B                                       0.0s
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (li  0.0s
 => [internal] load metadata for docker.io/library/node@sha256:9bef0ef1e2  0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 89B                                           0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 46.80kB                                       0.0s
 => [build 1/5] FROM docker.io/library/node@sha256:9bef0ef1e268f60627da9b  0.1s
 => [build 2/5] WORKDIR /app                                               0.0s
 => [stage-1 3/4] COPY . .                                                 0.0s
 => [build 3/5] COPY package.json .                                        0.0s
 => [build 4/5] COPY package-lock.json .                                   0.0s
 => [build 5/5] RUN npm install                                            1.8s
 => [stage-1 4/4] COPY --from=build /app/node_modules ./node_modules       0.4s 
 => exporting to image                                                     0.4s 
 => => exporting layers                                                    0.4s 
 => => writing image sha256:94ada296224b69df17df308c64f92b2a40f0e372c3150  0.0s 

 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 2)

LakeYS avatar Apr 27 '25 14:04 LakeYS