Skip to content

Commit

Permalink
Merge pull request #3075 from briannesbitt/feature/sponsors-update-job
Browse files Browse the repository at this point in the history
Create a job to update sponsors every month
  • Loading branch information
kylekatarnls authored Oct 9, 2024
2 parents fff50e3 + ec62deb commit d859d9b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/sponsors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Sponsors

on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
schedule:
- '0 0 15 * *'

jobs:
tests:
name: Update readme

runs-on: ubuntu-latest

steps:
- name: Checkout the code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.4
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
shell: bash
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "sponsors-${{ hashFiles('**/composer.json') }}"
restore-keys: "sponsors-${{ hashFiles('**/composer.json') }}"

- name: Install dependencies
uses: nick-fields/retry@v3
if: steps.composer-cache.outputs.cache-hit != 'true'
with:
timeout_minutes: 10
max_attempts: 3
command: composer update --prefer-dist --no-progress --prefer-stable

- name: Run test suite
run: composer sponsors

- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
add-paths: |
readme.md

0 comments on commit d859d9b

Please sign in to comment.