Merge pull request #2689 from robinboening/fix_switching_to_default_l… #13
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 JS packages | |
on: | |
push: | |
branches: | |
- main | |
- 7.1-stable | |
- 7.0-stable | |
- 6.1-stable | |
jobs: | |
Build: | |
uses: ./.github/workflows/build.yml | |
Upload: | |
runs-on: ubuntu-latest | |
needs: Build | |
if: success('Build') | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: javascripts-${{ github.ref_name }} | |
path: vendor/javascript | |
update_js_packages: | |
needs: Upload | |
runs-on: ubuntu-latest | |
name: Update JS packages | |
permissions: | |
contents: write | |
pull-requests: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
persist-credentials: false | |
- uses: actions/download-artifact@v4 | |
with: | |
name: javascripts-${{ github.ref_name }} | |
path: vendor/javascript | |
- name: Check git status | |
id: git-status | |
run: git diff --quiet || echo "changed=true" >> $GITHUB_OUTPUT | |
- name: git commit | |
if: steps.git-status.outputs.changed == 'true' | |
run: | | |
git config --local user.name 'AlchemyCMS - CI Bot' | |
git config --local user.email 'alchemy@blish.cloud' | |
git add vendor/javascript | |
git commit -m "Update JS packages" -m "Rebuilt packages due to updated dependencies. [skip ci]" | |
- name: Push changes | |
if: steps.git-status.outputs.changed == 'true' | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.ALCHEMY_CI_BOT_ACCESS_TOKEN }} | |
branch: ${{ github.ref }} |