Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action for setting up francabot #1976

Merged
merged 1 commit into from
Aug 30, 2023
Merged
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
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