Skip to content

Add 2 reusable workflows for update bundle plugins #1

Add 2 reusable workflows for update bundle plugins

Add 2 reusable workflows for update bundle plugins #1

name: Reusable workflow to auto update extensions
on:
workflow_call:
secrets:
SSH_KEY:
required: true
SSH_KNOWN_HOSTS:
required: true
GITHUB_TOKEN:

Check failure on line 10 in .github/workflows/update-from-extensions.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-from-extensions.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
jobs:
update-extensions:
runs-on: ubuntu-latest
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: Checkout
uses: actions/checkout@master
- name: Allows all Composer packages
run: composer global config --no-plugins allow-plugins true
- name: Install liborm85/composer-vendor-cleaner Composer package globally
run: composer global require liborm85/composer-vendor-cleaner
- name: Remove vendor folder and reinstall extensions
run: |
rm -rf vendor
composer update
- name: Commit changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add --all
git commit --message "Update extensions"
- name: Push changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}