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:
haimlm 2024-03-24 19:11:36 +02:00 committed by GitHub
parent 832cf585aa
commit ca28034a3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 16 deletions

View File

@ -36,20 +36,17 @@ jobs:
# https://github.com/sigstore/cosign-installer # https://github.com/sigstore/cosign-installer
- name: Install cosign - name: Install cosign
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@dd6b2e2b610a11fd73dd187a43d57cc1394e35f9 #v3.0.5 uses: sigstore/cosign-installer@v3.4.0
with:
cosign-release: 'v2.0.2'
# Workaround: https://github.com/docker/build-push-action/issues/461 - name: Set up Docker Buildx
- name: Setup Docker buildx uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
# Login against a Docker registry except on PR # Login against a Docker registry except on PR
# https://github.com/docker/login-action # https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }} - name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ github.actor }} username: ${{ github.actor }}
@ -59,7 +56,7 @@ jobs:
# https://github.com/docker/metadata-action # https://github.com/docker/metadata-action
- name: Extract Docker metadata - name: Extract Docker metadata
id: meta id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
@ -67,7 +64,7 @@ jobs:
# https://github.com/docker/build-push-action # https://github.com/docker/build-push-action
- name: Build and push Docker image - name: Build and push Docker image
id: build-and-push id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a uses: docker/build-push-action@v5
with: with:
context: . context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}

View File

@ -1,6 +1,8 @@
ARG ARG_COMPILE_BASE_IMAGE=accetto/ubuntu-vnc-xfce-opengl-g3 ARG ARG_COMPILE_BASE_IMAGE=accetto/ubuntu-vnc-xfce-opengl-g3
FROM $ARG_COMPILE_BASE_IMAGE as build FROM $ARG_COMPILE_BASE_IMAGE as build
USER root
USER root
RUN apt update && \ RUN apt update && \
apt upgrade -y && \ apt upgrade -y && \
apt install --fix-broken -y wget curl openjdk-17-jdk openjdk-11-jdk unzip apt install --fix-broken -y wget curl openjdk-17-jdk openjdk-11-jdk unzip
@ -26,11 +28,11 @@ RUN chmod +x ./gradlew && ./gradlew --version
# Build unciv # Build unciv
COPY . /src/ COPY . /src/
RUN chmod +x ./gradlew && ./gradlew desktop:classes RUN chmod +x ./gradlew && ./gradlew desktop:classes && \
RUN ./gradlew desktop:dist ./gradlew desktop:dist && \
RUN ./gradlew desktop:zipLinuxFilesForJar ./gradlew desktop:zipLinuxFilesForJar && \
RUN ./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan ./gradlew desktop:packrLinux64 --stacktrace --info --daemon --scan && \
RUN cd /src/deploy && unzip Unciv-Linux64.zip cd /src/deploy && unzip Unciv-Linux64.zip
FROM accetto/ubuntu-vnc-xfce-opengl-g3 as run FROM accetto/ubuntu-vnc-xfce-opengl-g3 as run
WORKDIR /home/headless/Desktop/ WORKDIR /home/headless/Desktop/

View File

@ -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! 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: If you have docker compose installed: