Skip to content

Commit 52341d2

Browse files
haukeAnsuel
authored andcommitted
CI: Import gpg keys from repository
This should increase the stability of the github CI system. Lately we see that GPG key import is often failing or the signature check later fails. This is hopefully fixing problems like this: ``` Run gpg --receive-keys 0xCD84BCED626471F1 0x1D53D1877742E911 0xCD54E82DADB3684D gpg: directory '/builder/.gnupg' created gpg: keybox '/builder/.gnupg/pubring.kbx' created gpg: keyserver receive failed: No keyserver available Error: Process completed with exit code 2. ``` and this: ``` 2025-08-08 23:12:40 (67.4 MB/s) - ‘sha256sums’ saved [10079047/10079047] gpg: assuming signed data in 'sha256sums' gpg: Signature made Fri 08 Aug 2025 10:12:51 AM UTC gpg: using EDDSA key 92C561DE55AE6552F3C736B82B0151090606D1D9 gpg: BAD signature from "OpenWrt Build System (Nitrokey3) <contact@openwrt.org>" [unknown] Error: Process completed with exit code 1. ``` Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> [ rework to use sparse-checkout ] Link: #49 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
1 parent ba03db3 commit 52341d2

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

.github/workflows/reusable_build.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,11 +432,24 @@ jobs:
432432
restore-keys: |
433433
${{ needs.setup_build.outputs.ccache_name }}-
434434
435+
- name: Checkout OpenWrt keyring
436+
if: inputs.build_toolchain == false && ((steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container') ||
437+
steps.parse-prebuilt-llvm.outputs.llvm-type == 'external')
438+
uses: actions/checkout@v4
439+
with:
440+
repository: openwrt/keyring
441+
path: keyring
442+
sparse-checkout: |
443+
gpg/CD54E82DADB3684D.asc
444+
gpg/0x1D53D1877742E911.asc
445+
gpg/626471F1.asc
446+
sparse-checkout-cone-mode: false
447+
435448
- name: Import GPG keys
436449
shell: su buildbot -c "sh -e {0}"
437450
if: inputs.build_toolchain == false && ((steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container') ||
438451
steps.parse-prebuilt-llvm.outputs.llvm-type == 'external')
439-
run: gpg --receive-keys 0xCD84BCED626471F1 0x1D53D1877742E911 0xCD54E82DADB3684D
452+
run: gpg --import keyring/gpg/CD54E82DADB3684D.asc keyring/gpg/0x1D53D1877742E911.asc keyring/gpg/626471F1.asc
440453

441454
- name: Download external toolchain/sdk
442455
if: inputs.build_toolchain == false && steps.parse-toolchain.outputs.toolchain-type != 'internal' && steps.parse-toolchain.outputs.toolchain-type != 'external_container'

0 commit comments

Comments
 (0)