Skip to content

Commit

Permalink
Add new latest 1.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RoiArthurB committed Feb 16, 2024
1 parent dfeff86 commit ec36cea
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 9 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/dockerimage-192.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ jobs:
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
# Push 1.9.2
docker push gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
# Push latest
docker tag gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }} gamaplatform/${{ env.IMAGE_NAME }}:latest
docker push gamaplatform/${{ env.IMAGE_NAME }}:latest
docker logout
- name: Publish in Github Package
Expand All @@ -35,8 +32,5 @@ jobs:
# Push 1.9.2
docker tag gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }} docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
docker push docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
# Push latest
docker tag gamaplatform/${{ env.IMAGE_NAME }}:latest docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:latest
docker push docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:latest
docker logout
42 changes: 42 additions & 0 deletions .github/workflows/dockerimage-193.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docker Image CI - 1.9.3

on:
push:
paths:
- 'tags/1.9.3/**'
workflow_dispatch:

env:
IMAGE_NAME: gama
VERSION: 1.9.3

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Build the Docker image
run: docker build . --file ./tags/${{ env.VERSION }}/Dockerfile --tag gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }}

- name: Publish in Docker Hub
run: |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
# Push 1.9.3
docker push gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
# Push latest
docker tag gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }} gamaplatform/${{ env.IMAGE_NAME }}:latest
docker push gamaplatform/${{ env.IMAGE_NAME }}:latest
docker logout
- name: Publish in Github Package
run: |
docker login docker.pkg.github.com -u ${{ secrets.BOT_GH_NAME }} -p ${{ secrets.GITHUB_TOKEN }}
# Push 1.9.3
docker tag gamaplatform/${{ env.IMAGE_NAME }}:${{ env.VERSION }} docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
docker push docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
# Push latest
docker tag gamaplatform/${{ env.IMAGE_NAME }}:latest docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:latest
docker push docker.pkg.github.com/gama-platform/gama.docker/${{ env.IMAGE_NAME }}:latest
docker logout
42 changes: 42 additions & 0 deletions tags/1.9.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM ubuntu:latest

MAINTAINER RoiArthurB <https://github.com/RoiArthurB>

LABEL org.label-schema.name="GAMA Headless Docker (1.9.3)" \
org.label-schema.description="Docker image of GAMA headless" \
org.label-schema.url="http://gama-platform.org" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/gama-platform/gama.docker" \
org.label-schema.vendor="GAMA Platform" \
org.label-schema.license="GPL-3.0"

# Update Ubuntu mirror && install needed software
RUN apt update && \
apt install -y --no-install-recommends curl wget ca-certificates unzip

# Create GAMA workspace
RUN mkdir -p /opt/gama-platform
RUN cd /opt/gama-platform

# Install GAMA v1.9.3 w/o JDK
RUN wget -q https://github.com/gama-platform/gama/releases/download/1.9.3/GAMA_1.9.3_Linux.zip -O "gama.zip" && \
unzip gama.zip -d /opt/gama-platform

# Set absolute path
RUN sed -i 's/$( dirname "${BASH_SOURCE\[0\]}" )/\/opt\/gama-platform\/headless/g' /opt/gama-platform/headless/gama-headless.sh

# Make script executable
RUN chmod +x /opt/gama-platform/Gama /opt/gama-platform/headless/gama-headless.sh

# Release image
FROM openjdk:17-jdk-alpine
COPY --from=0 /opt/gama-platform /opt/gama-platform

RUN apk --no-cache add bash ttf-dejavu libstdc++ libc6-compat \
&& ln -s /opt/gama-platform/headless/gama-headless.sh /usr/sbin/gama-headless

# Docker env
WORKDIR /opt/gama-platform/headless

ENTRYPOINT ["gama-headless"]
CMD ["-help"]
6 changes: 3 additions & 3 deletions tags/alpha/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:latest

MAINTAINER RoiArthurB <https://github.com/RoiArthurB>

LABEL org.label-schema.name="GAMA Headless Docker (1.9.3)" \
LABEL org.label-schema.name="GAMA Headless Docker (1.9.4)" \
org.label-schema.description="Docker image of GAMA headless" \
org.label-schema.url="http://gama-platform.org" \
org.label-schema.vcs-ref=$VCS_REF \
Expand All @@ -18,8 +18,8 @@ RUN apt update && \
RUN mkdir -p /opt/gama-platform
RUN cd /opt/gama-platform

# Install GAMA v1.9.3 w/o JDK
RUN wget -q $(curl https://api.github.com/repos/gama-platform/gama/releases/tags/1.9.3 | grep "/GAMA_1.9.3_Linux_[0-9].*zip" | cut -d ':' -f 2,3 | tr -d \") -O "gama.zip" && \
# Install GAMA v1.9.4 w/o JDK
RUN wget -q $(curl https://api.github.com/repos/gama-platform/gama/releases/tags/1.9.4 | grep "/GAMA_1.9.4_Linux_[0-9].*zip" | cut -d ':' -f 2,3 | tr -d \") -O "gama.zip" && \
unzip gama.zip -d /opt/gama-platform

# Set absolute path
Expand Down

0 comments on commit ec36cea

Please sign in to comment.