Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/go-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: generic-go-versionbuild

on:
workflow_call:
secrets:
GPG_PRIVATE_KEY:
required: true
GPG_PASSPHRASE:
required: true
inputs:
service:
required: true
Expand Down Expand Up @@ -165,11 +170,24 @@ jobs:
merge-multiple: true

- name: package with nfpm
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GPG_KEY_ID: mail@binarycodes.io
run: |
mkdir -p dist
nfpm pkg --packager archlinux --config nfpm.yaml --target dist/
nfpm pkg --packager deb --config nfpm.yaml --target dist/

# sign the package for arch linux
test -n "$GPG_PRIVATE_KEY" || { echo "GPG_PRIVATE_KEY is empty"; exit 1; }
printf '%s' "$GPG_PRIVATE_KEY" | gpg --batch --import
gpg --batch --list-secret-keys --keyid-format LONG

FPR="$(gpg --batch --list-secret-keys --with-colons | awk -F: '$1=="fpr"{print $10; exit}')"

gpg --batch --yes --local-user "$FPR" --pinentry-mode loopback --passphrase "$GPG_PASSPHRASE" --detach-sign dist/*.pkg.tar.zst

- name: upload build artifact
uses: actions/upload-artifact@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/go-ssh-keysign-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ jobs:
with:
service: go-ssh-keysign
artifactVersion: ${{ needs.set-version.outputs.short_sha }}
secrets:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
**/node_modules/
**/*ca_key*
src/**

# ignore test nfpm packages
dist/**
18 changes: 16 additions & 2 deletions nfpm.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
name: ssh-keysign
arch: amd64
platform: linux
version: 0.0.7
version: 0.0.8
section: default
priority: extra
maintainer: Sujoy Das <me@binarycodes.io>
description: Generate short lived, oauth verified, SSH certficates on the fly
license: GPL v3.0
homepage: https://github.com/binarycodes/ssh-key-signer

archlinux:
packager: Sujoy Das <me@binarycodes.io>
pkgbase: ssh-keysign

contents:
- src: ./go-ssh-keysign/bin/ssh-keysign-linux-amd64
dst: /usr/local/bin/ssh-keysign
dst: /usr/bin/ssh-keysign
file_info:
mode: 0755
owner: root
group: root

- src: ./LICENSE
dst: /usr/share/licenses/ssh-keysign/LICENSE