Skip to content
21 changes: 21 additions & 0 deletions actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,27 @@ runs:
with:
+: git curl gnupg.org

# Fix pkgxdev gnupg's gpgconf.ctl which contains unexpanded environment variables
- name: Fix GPG configuration
if: inputs.coverage == 'codecov' && inputs.container == 'true'
shell: bash
run: |
# Find and remove the malformed gpgconf.ctl file that contains unexpanded shell variables
# The pkgxdev gnupg installs gpgconf.ctl next to the gpgconf binary
if command -v gpgconf >/dev/null 2>&1; then
gpgconf_bin=$(command -v gpgconf)
gpgconf_ctl="$(dirname "$gpgconf_bin")/gpgconf.ctl"
if [ -f "$gpgconf_ctl" ]; then
echo "Removing malformed gpgconf.ctl: $gpgconf_ctl"
if ! rm -f "$gpgconf_ctl"; then
echo "Warning: Failed to remove gpgconf.ctl, GPG may not work correctly"
fi
fi
fi
# Ensure GNUPGHOME is set up correctly
mkdir -p "$HOME/.gnupg"
chmod 700 "$HOME/.gnupg"

- name: 📊 Upload coverage to Codecov
if: always() && inputs.coverage == 'codecov'
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
Expand Down
Loading