From ad3b0e3096b8c7a6c493572d746138e54b6a963b Mon Sep 17 00:00:00 2001 From: WoozyMasta Date: Wed, 15 Dec 2021 11:54:53 +0300 Subject: [PATCH] build: 4.9.1-0.8 --- Dockerfile | 8 ++++---- README.md | 24 ++++++++++++------------ action.yml | 2 +- entrypoint.sh | 3 +-- 4 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index f163490..fbfa16b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,8 @@ ARG ARCHI_VERSION=4.9.1 ARG COARCHI_VERSION=0.8.1.202112061132 ARG TZ=UTC +WORKDIR /archi + SHELL ["/bin/bash", "-o", "pipefail", "-x", "-e", "-u", "-c"] # DL3015 ignored for suppress org.freedesktop.DBus.Error.ServiceUnknown @@ -32,14 +34,12 @@ RUN ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && \ tar zxf - -C /opt/ && \ chmod +x /opt/Archi/Archi && \ # Install Collaboration plugin \ - mkdir -p /archi/.archi4/dropins/ && \ + mkdir -p /root/.archi4/dropins /archi/report /archi/project && \ curl "https://www.archimatetool.com/downloads/coarchi1/coArchi_$COARCHI_VERSION.archiplugin" \ --output modelrepository.archiplugin && \ - unzip modelrepository.archiplugin -d /archi/.archi4/dropins/ && \ + unzip modelrepository.archiplugin -d /root/.archi4/dropins/ && \ rm modelrepository.archiplugin COPY entrypoint.sh /opt/Archi/ -WORKDIR /archi - ENTRYPOINT [ "/opt/Archi/entrypoint.sh" ] diff --git a/README.md b/README.md index 53a5bc2..ebe6734 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,9 @@ You can check the operation of the container using the [example][] You can pull image from registries: -* `ghcr.io/woozymasta/archimate-ci:4.9.1-0.7` -* `quay.io/woozymasta/archimate-ci:4.9.1-0.7` -* `docker.io/woozymasta/archimate-ci:4.9.1-0.7` +* `ghcr.io/woozymasta/archimate-ci:4.9.1-0.8` +* `quay.io/woozymasta/archimate-ci:4.9.1-0.8` +* `docker.io/woozymasta/archimate-ci:4.9.1-0.8` ## Run Container @@ -57,7 +57,7 @@ docker run --rm -ti \ -e ARCHI_JASPER_REPORT_ENABLED=false \ -e ARCHI_CSV_REPORT_ENABLED=true \ -e ARCHI_EXPORT_MODEL_ENABLED=true \ - ghcr.io/woozymasta/archimate-ci:4.9.1-0.7 + ghcr.io/woozymasta/archimate-ci:4.9.1-0.8 ``` An example with handling a local repository: @@ -70,13 +70,13 @@ chmod o+rw ./report docker run --rm -ti \ -v $(pwd):/archi/project \ -v $(pwd)/report:/archi/report \ - ghcr.io/woozymasta/archimate-ci:4.9.1-0.7 + ghcr.io/woozymasta/archimate-ci:4.9.1-0.8 ``` Working with the CLI directly: ```bash -docker run --rm -ti ghcr.io/woozymasta/archimate-ci:4.9.1-0.7 --help +docker run --rm -ti ghcr.io/woozymasta/archimate-ci:4.9.1-0.8 --help ``` ## Configuration @@ -156,7 +156,7 @@ jobs: - name: Deploy Archi report id: archi - uses: WoozyMasta/archimate-ci-image@4.9.1-0.7 + uses: WoozyMasta/archimate-ci-image@4.9.1-0.8 with: archiHtmlReportEnabled: true archiJasperReportEnabled: true @@ -172,7 +172,7 @@ jobs: pages: stage: build image: - name: woozymasta/archimate-ci-image:4.9.1-0.7 + name: woozymasta/archimate-ci-image:4.9.1-0.8 script: - /opt/Archi/docker-entrypoint.sh @@ -203,8 +203,8 @@ pages: ```bash docker build \ - --tag archimate-ci:4.9.1-0.7 \ - --build-arg="ARCHI_VERSION=4.9.1-0.7" \ + --tag archimate-ci:4.9.1-0.8 \ + --build-arg="ARCHI_VERSION=4.9.1-0.8" \ --build-arg="COARCHI_VERSION=0.8.1.202112061132" \ ./ ``` @@ -227,7 +227,7 @@ podman run --rm -ti \ -v $(pwd)/report:/archi/report \ -e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git \ -e ARCHI_JASPER_REPORT_ENABLED=false \ - ghcr.io/woozymasta/archimate-ci:4.9.1-0.7 + ghcr.io/woozymasta/archimate-ci:4.9.1-0.8 ``` --- @@ -242,7 +242,7 @@ docker run --rm -ti \ -e GIT_REPOSITORY=https://github.com/WoozyMasta/archimate-ci-image-example.git --network=host --add-host="$(getent hosts gitlab.internal.tld | awk '{print $2 ":" $1}')" - ghcr.io/woozymasta/archimate-ci:4.9.1-0.7 + ghcr.io/woozymasta/archimate-ci:4.9.1-0.8 ``` diff --git a/action.yml b/action.yml index acfe015..67ca8f8 100644 --- a/action.yml +++ b/action.yml @@ -6,7 +6,7 @@ branding: color: blue runs: using: docker - image: docker://ghcr.io/woozymasta/archimate-ci-image:4.9.1-0.7 + image: docker://ghcr.io/woozymasta/archimate-ci-image:4.9.1-0.8 env: GITHUB_TOKEN: ${{ inputs.githubToken }} ARCHI_HTML_REPORT_ENABLED: ${{ inputs.archiHtmlReportEnabled }} diff --git a/entrypoint.sh b/entrypoint.sh index eb1956a..16242d1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,7 +5,7 @@ set -exuo pipefail # ---- # Script environments -: "${ARCHI_PROJECT_PATH:=/archi/project}" +: "${ARCHI_PROJECT_PATH:=${GITHUB_WORKSPACE:-/archi/project}}" : "${ARCHI_REPORT_PATH:=/archi/report}" : "${ARCHI_HTML_REPORT_ENABLED:=true}" : "${ARCHI_JASPER_REPORT_ENABLED:=false}" @@ -167,7 +167,6 @@ if [ "${GITHUB_ACTIONS:-}" == true ]; then _gh_repo+="${GITHUB_SERVER_URL//*\/\/}/$GITHUB_REPOSITORY.git" # URL # Set actions specified paths - ARCHI_PROJECT_PATH="${GITHUB_WORKSPACE:-$ARCHI_PROJECT_PATH}" ARCHI_REPORT_PATH="$ARCHI_PROJECT_PATH/$GIT_SUBTREE_PREFIX" ARCHI_HTML_REPORT_PATH="$ARCHI_REPORT_PATH" ARCHI_CSV_REPORT_PATH="$ARCHI_REPORT_PATH"