diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 552b3ad..e1f3c55 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -13,6 +13,9 @@ jobs: uses: ./ with: postgresql_version: 15 + jvm_options: | + dataverse.api.signature-secret=eikaizieb2Oghaex + dataverse.pid.datacite.rest-api-url=https://api.datacite.org create-dv: true - name: Check Dataverse Setup run: | diff --git a/action.yml b/action.yml index 2b47de7..eb71941 100644 --- a/action.yml +++ b/action.yml @@ -20,6 +20,9 @@ inputs: solr_version: description: "Override the Solr version to use" required: false + jvm_options: + description: "Line separated key-value pairs of JVM options to be set before startup. Example: dataverse.spi.exporters.directory=/..." + required: false create-dv: description: "Whether or not to create an example Dataverse" required: true @@ -32,7 +35,7 @@ runs: run: | docker pull -q ${{ inputs.image_dataverse }}:${{ inputs.image_tag }} docker pull -q ${{ inputs.image_configbaker }}:${{ inputs.image_tag }} - - name: "Prepare environment variables" + - name: "Prepare environment" shell: bash run: | PG_VERSION="${{ inputs.postgresql_version }}" @@ -55,6 +58,16 @@ runs: echo "DATAVERSE_IMAGE=${{ inputs.image_dataverse }}:${{ inputs.image_tag }}" | tee -a "${GITHUB_ENV}" echo "DATAVERSE_DB_USER=dataverse" | tee -a "${GITHUB_ENV}" echo "DATAVERSE_DB_PASSWORD=secret" | tee -a "${GITHUB_ENV}" + + echo "CONFIG_DIR=${RUNNER_TEMP}/dv/conf" | tee -a "${GITHUB_ENV}" + mkdir -p "${RUNNER_TEMP}/dv/conf" + while IFS= read -r line; do + echo "$line" + FILENAME="${RUNNER_TEMP}/dv/conf/$(echo "$line" | cut -f1 -d=)" + echo "$FILENAME" + echo "$line" | cut -f2- -d= > "$FILENAME" + done < <(printf '%s\n' "${{ inputs.jvm_options }}") + ls -l "${RUNNER_TEMP}/dv/conf" - name: "Start Dataverse service in background" shell: bash run: | diff --git a/docker-compose.yml b/docker-compose.yml index 746e965..aea9800 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,6 +20,7 @@ services: - solr volumes: - ${RUNNER_TEMP}/dv/data:/dv + - ${CONFIG_DIR}:/secrets tmpfs: - /dumps:mode=770,size=2052M,uid=1000,gid=1000 - /tmp:mode=770,size=2052M,uid=1000,gid=1000