Skip to content

add github action to implement #1490 contributor image (#1497) #1

add github action to implement #1490 contributor image (#1497)

add github action to implement #1490 contributor image (#1497) #1

name: Generate Contributors PNG
on:
push:
paths:
- '.all-contributorsrc'
jobs:
genimage:
if: github.ref == 'refs/heads/main' && github.repository == 'processing/processing4'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install canvas
- name: Run contributors-png generator
run: node utils/contributors-png.js
- name: Reset all changes except contributors.png
run: |
git restore --staged .
git add contributors.png
git checkout -- .
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Update contributors.png from .all-contributorsrc"
branch: update-contributors-png
title: "chore: update contributors.png from .all-contributorsrc"
body: "This PR updates the contributors.png to reflect changes in .all-contributorsrc"
add-paths: contributors.png
token: ${{ secrets.CONTRIBUTOR_PNG_ACCESS_TOKEN }}