mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 20:53:44 +08:00
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
|
# This workflow will run on dependabot pull requests to ensure that they update both the ember3 and ember5 lockfiles
|
||
|
|
||
|
name: Ember Version Lockfiles
|
||
|
|
||
|
on:
|
||
|
- pull_request
|
||
|
|
||
|
permissions:
|
||
|
contents: write
|
||
|
|
||
|
jobs:
|
||
|
help_dependabot:
|
||
|
runs-on: ubuntu-latest
|
||
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
||
|
steps:
|
||
|
- uses: actions/checkout@v4
|
||
|
with:
|
||
|
ref: ${{ github.head_ref }}
|
||
|
- name: Move lockfile to correct location
|
||
|
run: |
|
||
|
# Dependabot gets confused by the symlinks and dumps the updated lockfile in the root of the repo.
|
||
|
# Let's move it back to the correct location.
|
||
|
if [[ -f yarn-ember3.lock ]]; then
|
||
|
mv yarn-ember3.lock app/assets/javascripts/yarn-ember3.lock
|
||
|
fi
|
||
|
- name: Update ember5 lockfile
|
||
|
run: script/regen_ember_5_lockfile
|
||
|
- name: Push changes
|
||
|
env:
|
||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||
|
run: |
|
||
|
if [ ! -z "$(git status --porcelain)" ]; then
|
||
|
git config --global user.email "build@discourse.org"
|
||
|
git config --global user.name "discoursebuild"
|
||
|
git add .
|
||
|
git commit -m "Update lockfiles for ember version flag"
|
||
|
git push
|
||
|
fi
|