Skip to content

Fetch Contributors

Fetch Contributors #26

name: Fetch Contributors
on:
pull_request: # This will run the workflow on pull request events
types:
- closed
schedule: # This will run the workflow on a schedule
- cron: '0 0 * * 0'
workflow_dispatch: # This will run the workflow on manual trigger
permissions:
contents: write
jobs:
contrib-readme-job:
name: A job to automate contrib in readme
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Contribute List
uses: akhilmhdh/[email protected]
with:
image_size: 32
readme_path: "docs/contributors.md"
collaborators: all
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit changes
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true
run: |
printf '%s\n' $(curl "https://api.github.com/repos/DHD2280/Oxygen-Customizer/contributors") > ./app/src/main/assets/Misc/contributors.json
- name: Commit
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: 'beta'
commit-message: 'Fetch Contributors'
force-add: 'true'
rebase: 'true'
files: app/src/main/assets/Misc/contributors.json docs/contributors.md
name: GitHub
email: [email protected]