mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-06 05:35:51 -05:00
56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macOS-latest
|
|
- windows-latest
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v2
|
|
-
|
|
name: Get test key and passphrase
|
|
uses: actions/github-script@0.9.0
|
|
id: test
|
|
with:
|
|
script: |
|
|
const fs = require('fs');
|
|
core.setOutput('pgp', fs.readFileSync('.github/test-key.pgp', {encoding: 'utf8'}));
|
|
core.setOutput('passphrase', fs.readFileSync('.github/test-key.pass', {encoding: 'utf8'}));
|
|
-
|
|
name: Import GPG private key
|
|
id: import_gpg
|
|
uses: ./
|
|
with:
|
|
git_user_signingkey: true
|
|
git_commit_gpgsign: true
|
|
git_tag_gpgsign: true
|
|
git_push_gpgsign: true
|
|
git_committer_name: Joe Tester
|
|
git_committer_email: joe@foo.bar
|
|
env:
|
|
GPG_PRIVATE_KEY: ${{ steps.test.outputs.pgp }}
|
|
PASSPHRASE: ${{ steps.test.outputs.passphrase }}
|
|
-
|
|
name: GPG user IDs
|
|
run: |
|
|
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}"
|
|
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}"
|
|
echo "name: ${{ steps.import_gpg.outputs.name }}"
|
|
echo "email: ${{ steps.import_gpg.outputs.email }}"
|