Skip to content

Macos support

Macos support #115

Workflow file for this run

name: CLA Signature
on:
issue_comment:
types: [created]
jobs:
cla-sign:
if: github.event.issue.pull_request && contains(github.event.comment.body, 'I have read the CLA Document and I hereby sign the CLA') && github.event.comment.user.login != 'cla-bot[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Add contributor
run: |
USERNAME="${{ github.event.comment.user.login }}"
# Read current contributors
CONTRIBUTORS=$(cat .contributors)
# Check if already signed
if echo "$CONTRIBUTORS" | grep -q "\"$USERNAME\""; then
echo "Already signed"
exit 0
fi
# Add new contributor
echo "$CONTRIBUTORS" | jq --arg user "$USERNAME" '. += [$user]' > .contributors
# Configure git
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Commit and push
git add .contributors
git commit -m "Add $USERNAME to CLA signatories"
git push
- name: Trigger recheck
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: '@cla-bot check'
})