Generate Sponsors #1
This file contains hidden or 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
| # https://help.github.com/en/categories/automating-your-workflow-with-github-actions | |
| name: Generate Sponsors | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 15 14 * * * | |
| push: | |
| branches: | |
| - "2.2.x" | |
| paths: | |
| - '.github/workflows/sponsors.yml' | |
| - 'BACKERS.md' | |
| jobs: | |
| sponsors: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 | |
| with: | |
| egress-policy: audit | |
| - | |
| name: Import GPG key | |
| id: import-gpg | |
| uses: crazy-max/ghaction-import-gpg@e89d40939c28e39f97cf32126055eeae86ba74ec # v6.3.0 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PHPSTANBOT_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PHPSTANBOT_KEY_PASSPHRASE }} | |
| git_config_global: true | |
| git_user_signingkey: true | |
| git_commit_gpgsign: true | |
| - name: "Checkout" | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.PHPSTAN_BOT_TOKEN }} | |
| - name: "Construct template" | |
| id: template | |
| run: | | |
| echo "text<<MESSAGE" >> "$GITHUB_OUTPUT" | |
| echo '<li><a href="https://github.com/{{{ login }}}">{{{ name }}} ({{{ login }}})</a></li>' >> "$GITHUB_OUTPUT" | |
| echo "" >> "$GITHUB_OUTPUT" | |
| echo 'MESSAGE' >> "$GITHUB_OUTPUT" | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 500 | |
| maximum: 2999 | |
| marker: 'indi' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 500 | |
| maximum: 2999 | |
| organization: true | |
| marker: 'indi-org' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 3000 | |
| maximum: 9999 | |
| marker: 'small' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 3000 | |
| maximum: 9999 | |
| organization: true | |
| marker: 'small-org' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 10000 | |
| maximum: 32999 | |
| marker: 'bronze' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 10000 | |
| maximum: 32999 | |
| organization: true | |
| marker: 'bronze-org' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 33000 | |
| maximum: 49999 | |
| marker: 'silver' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 33000 | |
| maximum: 49999 | |
| organization: true | |
| marker: 'silver-org' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 50000 | |
| marker: 'gold' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: Generate Sponsors | |
| uses: ondrejmirtes/github-sponsors-readme-action@9fd59795af9477235df8f234f962ef3dd854592f # v1.2.2.3 | |
| with: | |
| token: ${{ secrets.SPONSORS_PAT }} | |
| file: 'BACKERS.md' | |
| minimum: 50000 | |
| organization: true | |
| marker: 'gold-org' | |
| template: ${{ steps.template.outputs.text }} | |
| - name: "Commit changes" | |
| uses: "stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403" # v5.2.0 | |
| id: "commit" | |
| with: | |
| commit_message: "Update BACKERS.md" | |
| commit_user_name: "phpstan-bot" | |
| commit_user_email: "ondrej+phpstanbot@mirtes.cz" | |
| commit_author: "phpstan-bot <ondrej+phpstanbot@mirtes.cz>" | |
| commit_options: "--gpg-sign" | |
| - name: "Slack Notification" | |
| if: steps.commit.outputs.changes_detected == 'true' | |
| uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # v2.3.3 | |
| env: | |
| SLACK_CHANNEL: sponsors | |
| SLACK_MESSAGE: 'https://github.com/phpstan/phpstan/commit/${{ steps.commit.outputs.commit_hash }}' | |
| SLACK_TITLE: Sponsors changed! | |
| SLACK_USERNAME: phpstan | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_SPONSORS_WEBHOOK }} | |
| MSG_MINIMAL: true |