V8.13.392.2025.11.07
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m16s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-11-07 18:23:26 +01:00
parent b83beba495
commit 678c91748f
5 changed files with 12 additions and 12 deletions

View File

@@ -131,7 +131,7 @@ jobs:
set +x set +x
set -euo pipefail set -euo pipefail
umask 0077 umask 0077
GNUPGHOME="/dev/shm/gnupg.${GITHUB_RUN_ID}.${GITHUB_JOB}" GNUPGHOME="${PWD}/gnupg.${GITHUB_RUN_ID}.${GITHUB_JOB}"
# shellcheck disable=SC2174 # shellcheck disable=SC2174
mkdir -p -m 0700 "${GNUPGHOME}" mkdir -p -m 0700 "${GNUPGHOME}"
echo "GNUPGHOME=${GNUPGHOME}" >> "${GITHUB_ENV}" echo "GNUPGHOME=${GNUPGHOME}" >> "${GITHUB_ENV}"
@@ -150,7 +150,7 @@ jobs:
- name: ⚙️ Configuring Git for signed CI/DEPLOY commits. - name: ⚙️ Configuring Git for signed CI/DEPLOY commits.
run: | run: |
set +x #set +x
set -euo pipefail set -euo pipefail
git config user.name "Marc S. Weidner BOT" git config user.name "Marc S. Weidner BOT"
git config user.email "msw+bot@coresecret.dev" git config user.email "msw+bot@coresecret.dev"

View File

@@ -89,7 +89,7 @@ jobs:
run: | run: |
set -euo pipefail set -euo pipefail
### GPG-Home relative to the Runner Workspace to avoid changing global files. ### GPG-Home relative to the Runner Workspace to avoid changing global files.
export GNUPGHOME="$(pwd)/.gnupg" export GNUPGHOME="$(PWD)/.gnupg"
mkdir -m 700 "${GNUPGHOME}" mkdir -m 700 "${GNUPGHOME}"
echo "${{ secrets.PGP_MSW_DEPLOY_CORESECRET_DEV }}" >| ci-bot.sec.asc echo "${{ secrets.PGP_MSW_DEPLOY_CORESECRET_DEV }}" >| ci-bot.sec.asc
gpg --batch --import ci-bot.sec.asc gpg --batch --import ci-bot.sec.asc
@@ -101,7 +101,7 @@ jobs:
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
export GNUPGHOME="$(pwd)/.gnupg" export GNUPGHOME="$(PWD)/.gnupg"
git config user.name "Marc S. Weidner BOT" git config user.name "Marc S. Weidner BOT"
git config user.email "msw+bot@coresecret.dev" git config user.email "msw+bot@coresecret.dev"
git config commit.gpgsign true git config commit.gpgsign true
@@ -268,7 +268,7 @@ jobs:
GIT_SSH_COMMAND: "ssh -p 42842" GIT_SSH_COMMAND: "ssh -p 42842"
run: | run: |
set -euo pipefail set -euo pipefail
export GNUPGHOME="$(pwd)/.gnupg" export GNUPGHOME="$(PWD)/.gnupg"
echo "🔄 Fetching origin/master ..." echo "🔄 Fetching origin/master ..."
git fetch origin master git fetch origin master
@@ -304,7 +304,7 @@ jobs:
GIT_SSH_COMMAND: "ssh -p 42842" GIT_SSH_COMMAND: "ssh -p 42842"
run: | run: |
set -euo pipefail set -euo pipefail
export GNUPGHOME="$(pwd)/.gnupg" export GNUPGHOME="$(PWD)/.gnupg"
if git diff --cached --quiet; then if git diff --cached --quiet; then
echo "✔️ No staged changes to commit." echo "✔️ No staged changes to commit."

View File

@@ -105,12 +105,13 @@ for arg in "$@"; do case "${arg,,}" in -h|--help) . ./lib/lib_usage.sh ;
for arg in "$@"; do case "${arg,,}" in -v|--version) . ./lib/lib_version.sh ; version; exit 0;; esac; done for arg in "$@"; do case "${arg,,}" in -v|--version) . ./lib/lib_version.sh ; version; exit 0;; esac; done
for arg in "$@"; do case "${arg,,}" in -d|--debug) . ./meta_sources_debug.sh; debugger "${@}";; esac; done for arg in "$@"; do case "${arg,,}" in -d|--debug) . ./meta_sources_debug.sh; debugger "${@}";; esac; done
### ALL CHECKS DONE. READY TO START THE SCRIPT.
printf "\e[95m++++ ++++ ++++ ++++ ++++ ++++ ++ 🧪 %s starting ... \e[0m\n" "${BASH_SOURCE[0]}"
declare -grx VAR_SETUP="true"
### SECURING SECRETS ARTIFACTS. ### SECURING SECRETS ARTIFACTS.
find "${VAR_TMP_SECRET}" -type f -exec chmod 0400 {} + find "${VAR_TMP_SECRET}" -type f -exec chmod 0400 {} +
### ALL CHECKS DONE. READY TO START THE SCRIPT.
declare -grx VAR_SETUP="true"
### SOURCING VARIABLES. ### SOURCING VARIABLES.
[[ "${VAR_SETUP}" == true ]] && { [[ "${VAR_SETUP}" == true ]] && {
source_guard "./var/color.var.sh" source_guard "./var/color.var.sh"

View File

@@ -62,7 +62,7 @@ clean_up() {
# Kill gpg-agent and remove artifacts securely. # Kill gpg-agent and remove artifacts securely.
if [[ ! "${VAR_CDLB_INSIDE_RUNNER}" == "true" ]]; then if [[ ! "${VAR_CDLB_INSIDE_RUNNER}" == "true" ]]; then
if [[ -n "${GNUPGHOME:-}" && -d "${GNUPGHOME}" && "${GNUPGHOME}" == /dev/shm/cdlb_*_gnupg ]]; then if [[ -n "${GNUPGHOME:-}" && -d "${GNUPGHOME}" ]]; then
gpgconf --kill gpg-agent >/dev/null 2>&1 || true gpgconf --kill gpg-agent >/dev/null 2>&1 || true

View File

@@ -46,7 +46,7 @@ init_gnupg() {
printf "\e[93m++++ ++++ ++++ ++++ ++++ ++++ ++ VAR_CDLB_INSIDE_RUNNER: [%s] \e[0m\n" "${VAR_CDLB_INSIDE_RUNNER}" printf "\e[93m++++ ++++ ++++ ++++ ++++ ++++ ++ VAR_CDLB_INSIDE_RUNNER: [%s] \e[0m\n" "${VAR_CDLB_INSIDE_RUNNER}"
declare -grx GNUPGHOME="/dev/shm/cdlb_${VAR_ISO8601}_gnupg" declare -grx GNUPGHOME="/${VAR_WORKDIR}/cdlb_${VAR_ISO8601}_gnupg"
# shellcheck disable=SC2174 # shellcheck disable=SC2174
mkdir -p -m 0700 "${GNUPGHOME}" mkdir -p -m 0700 "${GNUPGHOME}"
@@ -63,7 +63,6 @@ EOF
printf "\e[91m++++ ++++ ++++ ++++ ++++ ++++ ++ Failed to launch gpg-agent. \e[0m\n" printf "\e[91m++++ ++++ ++++ ++++ ++++ ++++ ++ Failed to launch gpg-agent. \e[0m\n"
fi fi
else else