👷 per-project CLA gist #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Update CLA Gist' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'policies/CLA.md' | |
jobs: | |
update-gist: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update gist | |
env: | |
GH_TOKEN: ${{ secrets.CLA_GIST_WRITE_PAT }} | |
run: | | |
# update gist with specific project data | |
while IFS=$'\t' read -r name entity gist _; do | |
echo "Project Name: $name\n" > tmp.md | |
echo "Project Entity: $entity\n\n" >> tmp.md | |
cat policies/CLA.md >> tmp.md | |
gh gist edit $gist -f CLA.md tmp.md | |
done < <(yq e '.project-cla[] | [.name, .entity, .gist] | @tsv' .github/project-cla.yaml) | |