Skip to content

fix: allow write permission for this job dependency_updater.yml #3

fix: allow write permission for this job dependency_updater.yml

fix: allow write permission for this job dependency_updater.yml #3

name: Composer Update
on:
schedule:
- cron: '0 0 * * 0' # This will run every Sunday at midnight
push:
branches:
- main
jobs:
update:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3' # Specify your PHP version
tools: composer
- name: Update Composer dependencies
run: composer update
- name: Commit changes
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add composer.json composer.lock
git commit -m "Automated Composer update" || echo "No changes to commit"
git push