-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfeff86
commit ec36cea
Showing
4 changed files
with
87 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters