forked from pAI-OS/paios
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.25 KB
/
verify-gpg-signatures.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Verify GPG Signatures on Commits
on:
push:
branches:
- '**'
workflow_dispatch:
inputs:
check_all_commits:
description: 'Check all commits in the repository'
required: true
default: false
type: boolean
jobs:
verify-signatures:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up GPG
run: |
mkdir -p ~/.gnupg
echo "use-agent" >> ~/.gnupg/gpg.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
chmod 700 ~/.gnupg
- name: Run GPG signature verification
run: |
chmod +x .github/scripts/verify-gpg-signatures.sh
if ! .github/scripts/verify-gpg-signatures.sh; then
echo "GPG signature verification failed or encountered an error."
exit 1
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_EVENT_NAME: ${{ github.event_name }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
GITHUB_SHA: ${{ github.sha }}
CHECK_ALL_COMMITS: ${{ github.event.inputs.check_all_commits || 'false' }}