Update Dependencies #60
This file contains 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
name: Update Dependencies | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
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.3' | |
extensions: pcov, gd | |
- 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 diff --exit-code || ( | |
git add . | |
git commit -m 'Update dependencies' | |
git push | |
) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |