Add 2 reusable workflows for update bundle plugins #1
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: 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 GitHub Actions / .github/workflows/update-from-extensions.ymlInvalid workflow file
|
||
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 }} |