Skip to content

Commit c1d1c65

Browse files
committed
Try a different pass set up command.
1 parent f54d863 commit c1d1c65

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

.github/workflows/code_test_and_deploy.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,29 @@ jobs:
100100
- name: Install pass on Linux
101101
if: runner.os == 'Linux'
102102
run: |
103-
sudo apt-get update && sudo apt-get install -y pass gnupg
104-
export GNUPGHOME=$(mktemp -d)
105-
gpg --batch --passphrase '' --quick-gen-key "CI Key" default default never
106-
pass init "CI Key"
103+
set -euo pipefail
104+
sudo apt-get update
105+
sudo apt-get install -y pass gnupg git
106+
107+
# Create a dedicated GPG home for this job
108+
export GNUPGHOME="$(mktemp -d)"
109+
echo "GNUPGHOME=$GNUPGHOME" >> "$GITHUB_ENV" # <-- make it available to later steps
110+
111+
# Generate a non-interactive key (no passphrase), no expiry
112+
gpg --batch --yes --pinentry-mode loopback --passphrase '' \
113+
--quick-gen-key "CI Key <[email protected]>" default default 0
114+
115+
# Initialize pass with the key fingerprint (more robust than UID)
116+
FPR="$(gpg --list-secret-keys --with-colons | awk -F: '/^fpr:/ {print $10; exit}')"
117+
pass init "$FPR"
118+
119+
# (Optional) smoke test: ensure pass can encrypt
120+
printf '%s\n' "$(openssl rand -base64 16)" | pass insert -m -f ci/smoke-test
107121
108122
- name: RClone Encryption
109123
run: |
124+
set -euo pipefail
125+
# GNUPGHOME is available here because we wrote it to $GITHUB_ENV
110126
pytest -k test_rclone_encryption
111127
112128

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,6 @@ ignore = [
164164
datashuttle = "datashuttle.tui_launcher:main"
165165

166166
[tool.codespell]
167-
skip = '.git,*.pdf,*.svg'
167+
skip = '.git,*.pdf,*.svg,*.yml'
168168
#
169169
# ignore-words-list = ''

0 commit comments

Comments
 (0)