mirror of
https://github.com/yairm210/Unciv.git
synced 2024-12-22 17:24:24 +07:00
Update Docker signing GitHub action and consolidate RUN commands in.. (#11348)
* Update Docker signing GitHub action and consolidate RUN commands in Dockerfile * Fix: Readme should use yairm210/unciv for docker reference
This commit is contained in:
parent
832cf585aa
commit
ca28034a3c
15
.github/workflows/dockerPublish.yml
vendored
15
.github/workflows/dockerPublish.yml
vendored
@ -36,20 +36,17 @@ jobs:
|
||||
# https://github.com/sigstore/cosign-installer
|
||||
- name: Install cosign
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 #v3.0.5
|
||||
with:
|
||||
cosign-release: 'v2.0.2'
|
||||
uses: sigstore/cosign-installer@v3.4.0
|
||||
|
||||
|
||||
# Workaround: https://github.com/docker/build-push-action/issues/461
|
||||
- name: Setup Docker buildx
|
||||
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# Login against a Docker registry except on PR
|
||||
# https://github.com/docker/login-action
|
||||
- name: Log into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
@ -59,7 +56,7 @@ jobs:
|
||||
# https://github.com/docker/metadata-action
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
|
||||
@ -67,7 +64,7 @@ jobs:
|
||||
# https://github.com/docker/build-push-action
|
||||
- name: Build and push Docker image
|
||||
id: build-and-push
|
||||
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
|
12
Dockerfile
12
Dockerfile
@ -1,5 +1,7 @@
|
||||
ARG ARG_COMPILE_BASE_IMAGE=accetto/ubuntu-vnc-xfce-opengl-g3
|
||||
|
||||
FROM $ARG_COMPILE_BASE_IMAGE as build
|
||||
|
||||
USER root
|
||||
RUN apt update && \
|
||||
apt upgrade -y && \
|
||||
@ -26,11 +28,11 @@ RUN chmod +x ./gradlew && ./gradlew --version
|
||||
|
||||
# Build unciv
|
||||
COPY . /src/
|
||||
RUN chmod +x ./gradlew && ./gradlew desktop:classes
|
||||
RUN ./gradlew desktop:dist
|
||||
RUN ./gradlew desktop:zipLinuxFilesForJar
|
||||
RUN ./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan
|
||||
RUN cd /src/deploy && unzip Unciv-Linux64.zip
|
||||
RUN chmod +x ./gradlew && ./gradlew desktop:classes && \
|
||||
./gradlew desktop:dist && \
|
||||
./gradlew desktop:zipLinuxFilesForJar && \
|
||||
./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan && \
|
||||
cd /src/deploy && unzip Unciv-Linux64.zip
|
||||
|
||||
FROM accetto/ubuntu-vnc-xfce-opengl-g3 as run
|
||||
WORKDIR /home/headless/Desktop/
|
||||
|
@ -111,7 +111,7 @@ From what I understand, intellectual property rights apply to names, characters
|
||||
|
||||
If anyone has any real legal sources, or can shed some light on the limits of what is and is not allowed, I'd be happy to hear!
|
||||
|
||||
## Run with Docker [![Docker](https://github.com/haimlm/Unciv/actions/workflows/dockerPublish.yml/badge.svg)](https://github.com/haimlm/Unciv/actions/workflows/dockerPublish.yml)
|
||||
## Run with Docker [![Docker](https://github.com/yairm210/Unciv/actions/workflows/dockerPublish.yml/badge.svg)](https://github.com/yairm210/Unciv/actions/workflows/dockerPublish.yml)
|
||||
|
||||
If you have docker compose installed:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user