Skip to content

Commit

Permalink
DEVOPS-271: Feat/gpg tests and examples (#6)
Browse files Browse the repository at this point in the history
* add gpg, rpm and deb examples

* added test files
  • Loading branch information
Klaven authored Oct 2, 2024
1 parent 5736691 commit 01ba8d5
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/sign-deb-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: GPG sign DEB
on: workflow_dispatch
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: setup GPG
uses: ./shared-workflows/devops/setup-gpg
with:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-public-key: ${{ secrets.GPG_PUBLIC_KEY }}
gpg-key-pass: ${{ secrets.GPG_PASS }}
gpg-key-name: "aerospike-inc"

- name: GPG sign deb # gpg sign and verify deb packages
run: |
dpkg-sig --sign builder tests/*.deb
dpkg-sig --verify tests/*.deb
23 changes: 23 additions & 0 deletions .github/workflows/sign-file-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: GPG sign file
on: workflow_dispatch
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: setup GPG
uses: ./shared-workflows/devops/setup-gpg
with:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-public-key: ${{ secrets.GPG_PUBLIC_KEY }}
gpg-key-pass: ${{ secrets.GPG_PASS }}
gpg-key-name: "aerospike-inc"

- name: GPG sign artifacts # Signing other artifacts
env:
GPG_TTY: no-tty
GPG_PASSPHRASE: ${{ secrets.GPG_PASS }}
run: |
gpg --detach-sign --no-tty --batch --yes --output README.md.asc --passphrase "$GPG_PASSPHRASE" README.md
gpg --verify README.md.asc README.md
22 changes: 22 additions & 0 deletions .github/workflows/sign-rpm-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: GPG sign RPM
on: workflow_dispatch
jobs:
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: setup GPG
uses: ./shared-workflows/devops/setup-gpg
with:
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
gpg-public-key: ${{ secrets.GPG_PUBLIC_KEY }}
gpg-key-pass: ${{ secrets.GPG_PASS }}
gpg-key-name: "aerospike-inc"

- name: Sign and check rpm # gpg sign and verify rpm packages
# your rpm here
run: |
rpm --addsign tests/*.rpm
rpm --checksig tests/*.rpm
Binary file added tests/test-1.0-2.noarch.rpm
Binary file not shown.
Binary file added tests/test.deb
Binary file not shown.

0 comments on commit 01ba8d5

Please sign in to comment.