import-gpg/.github/workflows/ci.yml

55 lines
1.4 KiB
YAML
Raw Normal View History

2020-05-03 21:09:41 +02:00
name: ci
on:
push:
branches:
2020-05-07 20:57:28 +02:00
- 'master'
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
2020-05-03 21:09:41 +02:00
jobs:
ci:
2020-05-03 21:35:54 +02:00
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
2020-05-06 00:31:46 +02:00
- windows-latest
2020-05-03 21:09:41 +02:00
steps:
-
name: Checkout
uses: actions/checkout@v2
-
2020-05-12 20:48:02 +02:00
name: Get test key and passphrase
2020-05-12 20:36:05 +02:00
uses: actions/github-script@0.9.0
2020-05-12 20:30:44 +02:00
id: test
2020-05-12 20:36:05 +02:00
with:
script: |
2020-05-12 20:37:28 +02:00
const fs = require('fs');
2020-05-12 20:36:05 +02:00
core.setOutput('pgp', fs.readFileSync('.github/test-key.pgp', {encoding: 'utf8'}));
core.setOutput('passphrase', fs.readFileSync('.github/test-key.pass', {encoding: 'utf8'}));
2020-05-03 21:09:41 +02:00
-
name: Import GPG private key
2020-05-07 20:46:52 +02:00
id: import_gpg
2020-05-03 21:09:41 +02:00
uses: ./
with:
2020-05-06 01:21:41 +02:00
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true
git_push_gpgsign: true
2020-05-03 21:09:41 +02:00
env:
2020-05-12 20:30:44 +02:00
GPG_PRIVATE_KEY: ${{ steps.test.outputs.pgp }}
PASSPHRASE: ${{ steps.test.outputs.passphrase }}
2020-05-07 20:46:52 +02:00
-
name: GPG user IDs
run: |
echo "fingerprint: ${{ steps.import_gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import_gpg.outputs.keyid }}"
2020-05-12 20:48:02 +02:00
echo "name: ${{ steps.import_gpg.outputs.name }}"
2020-05-07 20:46:52 +02:00
echo "email: ${{ steps.import_gpg.outputs.email }}"