Skip to content

Commit f77a4ca

Browse files
committed
fix: Ensure public key is available for imports in PRs
1 parent 31df2ed commit f77a4ca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/create-apt-repo.yml

+10
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,15 @@ jobs:
123123
- name: List packages
124124
run: |
125125
find $(pwd) -name '*.deb'
126+
# This step isn't strictly necessary for push & schedule runs,
127+
# but is required for imports to work when the main repo
128+
# key material isn't available, say in a PR.
129+
- name: Get import GPG key
130+
id: get_import_key
131+
run: |
132+
echo 'gpg_public_key<<EOF' >> $GITHUB_OUTPUT
133+
curl -s https://kanidm.github.io/kanidm_ppa/kanidm_ppa.asc >> $GITHUB_OUTPUT
134+
echo 'EOF' >> $GITHUB_OUTPUT
126135
- name: Create Aptly repo
127136
uses: jinnatar/[email protected]
128137
with:
@@ -139,6 +148,7 @@ jobs:
139148
# Provide your own key material in a fork to test with signed repo snapshots.
140149
gpg_private_key: "${{ secrets.GPG_PRIVATE_KEY }}"
141150
gpg_passphrase: "${{ secrets.PASSPHRASE }}"
151+
import_gpg_key: "${{ steps.get_import_key.outputs.gpg_public_key }}"
142152

143153
# Step 4. Publish the created repo if and only if it's a push to main.
144154
publish:

0 commit comments

Comments
 (0)