mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-12-24 12:12:08 -05:00
e33a6489fd
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
95 lines
2.7 KiB
YAML
95 lines
2.7 KiB
YAML
name: ci
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 10 * * *' # everyday at 10am
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'releases/v*'
|
|
pull_request:
|
|
branches:
|
|
- 'master'
|
|
|
|
jobs:
|
|
armored:
|
|
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@v3
|
|
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
|
|
id: import_gpg
|
|
uses: ./
|
|
with:
|
|
gpg-private-key: ${{ steps.test.outputs.pgp }}
|
|
passphrase: ${{ steps.test.outputs.passphrase }}
|
|
git-user-signingkey: true
|
|
git-commit-gpgsign: true
|
|
git-tag-gpgsign: true
|
|
git-push-gpgsign: true
|
|
-
|
|
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 }}"
|
|
|
|
base64:
|
|
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@v3
|
|
id: test
|
|
with:
|
|
script: |
|
|
const fs = require('fs');
|
|
core.setOutput('pgp-base64', fs.readFileSync('.github/test-key-base64.pgp', {encoding: 'utf8'}));
|
|
core.setOutput('passphrase', fs.readFileSync('.github/test-key.pass', {encoding: 'utf8'}));
|
|
-
|
|
name: Import GPG
|
|
id: import_gpg
|
|
uses: ./
|
|
with:
|
|
gpg-private-key: ${{ steps.test.outputs.pgp-base64 }}
|
|
passphrase: ${{ steps.test.outputs.passphrase }}
|
|
git-user-signingkey: true
|
|
git-commit-gpgsign: true
|
|
git-tag-gpgsign: true
|
|
git-push-gpgsign: true
|
|
-
|
|
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 }}"
|