diff --git a/.github/workflows/grype.yml b/.github/workflows/grype.yml index c0b643b8..6fe28452 100644 --- a/.github/workflows/grype.yml +++ b/.github/workflows/grype.yml @@ -33,8 +33,8 @@ jobs: with: cache-read-only: false arguments: ${{ inputs.image }}:grype ${{ inputs.digest }} --info - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: - name: Grype Reports + name: ${{ inputs.image }} Grype Reports path: build/**/*-grype.* diff --git a/cantaloupe/rootfs/etc/cont-init.d/01-set-api-secret.sh b/cantaloupe/rootfs/etc/cont-init.d/01-set-api-secret.sh deleted file mode 100755 index f6461de2..00000000 --- a/cantaloupe/rootfs/etc/cont-init.d/01-set-api-secret.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/with-contenv bash -set -e - -ENV_FILE="/var/run/s6/container_environment/CANTALOUPE_ENDPOINT_API_SECRET" -if [ ! -s "$ENV_FILE" ]; then - openssl rand -hex 16 > "$ENV_FILE" - echo "CANTALOUPE_ENDPOINT_API_SECRET was empty. Set to a new random value." -fi diff --git a/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/dependencies.d/container-environment b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/dependencies.d/container-environment new file mode 100644 index 00000000..e69de29b diff --git a/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/type b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/type new file mode 100644 index 00000000..bdd22a18 --- /dev/null +++ b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/type @@ -0,0 +1 @@ +oneshot diff --git a/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/up b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/up new file mode 100755 index 00000000..34bb7476 --- /dev/null +++ b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/cantaloupe-defaults/up @@ -0,0 +1 @@ +/etc/s6-overlay/scripts/cantaloupe-defaults.sh diff --git a/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/confd-oneshot/dependencies.d/cantaloupe-defaults b/cantaloupe/rootfs/etc/s6-overlay/s6-rc.d/confd-oneshot/dependencies.d/cantaloupe-defaults new file mode 100644 index 00000000..e69de29b diff --git a/cantaloupe/rootfs/etc/s6-overlay/scripts/cantaloupe-defaults.sh b/cantaloupe/rootfs/etc/s6-overlay/scripts/cantaloupe-defaults.sh new file mode 100755 index 00000000..caab0146 --- /dev/null +++ b/cantaloupe/rootfs/etc/s6-overlay/scripts/cantaloupe-defaults.sh @@ -0,0 +1,9 @@ +#!/command/with-contenv bash +# shellcheck shell=bash +set -ex + +# Set the default value for CANTALOUPE_ENDPOINT_API_SECRET if none provided. +DEFAULT_SECRET=$(openssl rand -hex 16) +cat <