Skip to content

Commit

Permalink
Add actions for setting up francabot
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh committed Aug 29, 2023
1 parent eb3a5d3 commit 2583b77
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/actions/setup-francabot/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Load global configuration settings for francabot
description: Set up author information and GPG signature
author: Marten Lohstroh <marten@berkeley.edu>

inputs:
gpg-key:
description: 'francabot GPG key'
required: true
gpg-passphrase:
description: 'francabot GPG passphrase'
required: true

runs:
using: composite
steps:
- name: Set environment variables
run: |
echo "username=lingua-franca[bot]" >> "$GITHUB_ENV"
echo "email=97201490+francabot@users.noreply.github.com" >> "$GITHUB_ENV"
echo "user-and-email=lingua-franca[bot] <97201490+francabot@users.noreply.github.com>" >> "$GITHUB_ENV"
shell: bash
- name: Configure git username and email
run: |
git config --global user.name '${{ env.username }}'
git config --global user.email '${{ env.email }}'
shell: bash
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ inputs.gpg-key }}
passphrase: ${{ inputs.gpg-passphrase }}
git_config_global: true
git_user_signingkey: true
git_commit_gpgsign: true

0 comments on commit 2583b77

Please sign in to comment.