@@ -57,18 +57,23 @@ runs:
57
57
fi
58
58
59
59
- name : Import GPG Key
60
- shell : bash
60
+ shell : sh
61
61
run : |
62
- echo -n ${{ inputs.gpg-sign-key }} | base64 --decode \
63
- | gpg --pinentry-mode loopback \
64
- --passphrase-file <(echo ${{ inputs.gpg-passphrase }}) \
65
- --import
66
- GPG_FINGERPRINT=$(gpg -K --with-fingerprint \
67
- | sed -n 4p | sed -e 's/ *//g')
62
+ echo ${{ inputs.gpg-passphrase }} > passfile
63
+ echo -n ${{ inputs.gpg-sign-key }} | base64 --decode > signkey
64
+ gpg --pinentry-mode loopback \
65
+ --passphrase-file passfile \
66
+ --import signkey
67
+ rm passfile signkey
68
+ GPG_FINGERPRINT=$( \
69
+ gpg -K --with-fingerprint \
70
+ | sed -n 4p \
71
+ | sed -e 's/ *//g' \
72
+ )
68
73
echo "${GPG_FINGERPRINT}:6:" | gpg --import-ownertrust
69
74
70
75
- name : Preset Passphrase In GPG Agent
71
- shell : bash
76
+ shell : sh
72
77
run : |
73
78
GPG_KEYGRIP=`gpg --with-keygrip -K \
74
79
| sed -n '/[S]/{n;p}' \
@@ -77,20 +82,21 @@ runs:
77
82
GPG_PASSPHRASE_HEX=`echo -n ${{ inputs.gpg-passphrase }} \
78
83
| od -A n -t x1 \
79
84
| tr -d ' ' | tr -d '\n'`
80
- echo "PRESET_PASSPHRASE $GPG_KEYGRIP -1 $GPG_PASSPHRASE_HEX" | gpg-connect-agent
85
+ echo "PRESET_PASSPHRASE $GPG_KEYGRIP -1 $GPG_PASSPHRASE_HEX" \
86
+ | gpg-connect-agent
81
87
82
88
- name : Configure Git
83
- shell : bash
89
+ shell : sh
84
90
run : |
85
91
export CI_SIGNINGKEY_ID=$( \
86
92
gpg --list-signatures --with-colons \
87
93
| grep 'sig' \
88
- | grep ${{ inputs.git-email }} \
94
+ | grep ${{ inputs.git-email }} \
89
95
| head -n 1 \
90
96
| cut -d':' -f5 \
91
97
)
92
98
git config --global user.name "${{ inputs.git-username }}"
93
99
git config --global user.email "${{ inputs.git-email }}"
94
100
git config --global user.signingkey $CI_SIGNINGKEY_ID
95
101
git config --global commit.gpgsign true
96
- git config --global tag.gpgsign true
102
+ git config --global tag.gpgsign true
0 commit comments