forked from discourse/discourse
-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (34 loc) · 1.22 KB
/
ember-version-lockfiles.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# 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-ember5.lock ]]; then
mv yarn-ember5.lock app/assets/javascripts/yarn-ember5.lock
fi
- name: Update ember3 lockfile
run: script/regen_ember_3_lockfile
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ! -z "$(git status --porcelain)" ]; then
git config --global user.email "[email protected]"
git config --global user.name "discoursebuild"
git add .
git commit -m "Update lockfiles for ember version flag"
git push
fi