File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed
Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 11name : Build
22
33on :
4+ pull_request :
5+ branches :
6+ - develop
47 schedule :
58 - cron : ' 0 2 * * *'
69
10+ env :
11+ CI_GPG_KEYID : ${{ secrets.CI_GPG_KEYID }}
12+ CI_GPG_KEY : ${{ secrets.CI_GPG_KEY }}
13+ CI_GPG_PASSPHRASE : ${{ secrets.CI_GPG_PASSPHRASE }}
14+
715jobs :
816 build :
917 if : " !contains(github.event.head_commit.message, 'ci skip')"
1927 set -x
2028 dnf install -y dnf-plugins-core
2129 dnf copr enable -y plfiorini/liri-tools
22- dnf install -y ostree-upload flatpak-builder
30+ dnf install -y ostree-upload flatpak-builder gnupg2 pinentry
31+ - name : Import GPG key
32+ run : |
33+ .github/workflows/scripts/setup-gpg
34+ gpg --list-keys ${CI_GPG_KEYID}
2335 - name : Build
2436 run : |
2537 set -x
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ flatpak remote-add flathub --from https://flathub.org/repo/flathub.flatpakrepo -
1717now=$( date +" %Y-%m-%d %H:%M:%S" )
1818
1919flatpak-builder build ${app_id} .yaml \
20+ --gpg-sign=${CI_GPG_KEYID} \
21+ --gpg-homedir=${HOME} /.gnupg \
2022 --force-clean \
2123 --subject=" Build of ${app_id} at ${now} " \
2224 --install-deps-from=flathub \
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # SPDX-FileCopyrightText: 2020 Pier Luigi Fiorini <[email protected] >3+ #
4+ # SPDX-License-Identifier: CC0-1.0
5+
6+ set -e
7+
8+ export GNUPGHOME=${HOME} /.gnupg
9+
10+ mkdir -m 700 -p ${GNUPGHOME}
11+ printf " ${CI_GPG_KEY} " | base64 --decode > ${GNUPGHOME} /private.key
12+ gpg --batch --import ${GNUPGHOME} /private.key
13+
14+ cat > ${GNUPGHOME} /gpg.conf << EOF
15+ use-agent
16+ pinentry-mode loopback
17+ passphrase ${CI_GPG_PASSPHRASE}
18+ no-tty
19+ batch
20+ yes
21+ EOF
You can’t perform that action at this time.
0 commit comments