Skip to content

Commit

Permalink
Trying to automate the package updates
Browse files Browse the repository at this point in the history
  • Loading branch information
amitavroy committed Jan 8, 2025
1 parent 0058dac commit 1e85a0d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Update Dependencies

on:
schedule:
- cron: '*/5 * * * *' # Runs every day at midnight

jobs:
update-dependencies:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0' # Specify your PHP version

- name: Install Composer
run: sudo apt-get install composer

- name: Update Composer dependencies
run: composer update

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.14.0' # Specify your Node.js version

- name: Update npm dependencies
run: npm update

- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add .
git commit -m 'Update dependencies'
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1e85a0d

Please sign in to comment.