Skip to content

Commit e635eef

Browse files
Merge pull request #8995 from Fryguy/gha_yarn_lock
Add GitHub Action to update yarn.lock weekly
2 parents fad13fa + 8de76c6 commit e635eef

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/yarn_lock.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Update yarn.lock
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 * * 0'
7+
8+
jobs:
9+
update-yarn-lock:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up system
14+
run: bin/before_install
15+
- name: Set up Node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: "18"
19+
cache: yarn
20+
registry-url: https://npm.manageiq.org/
21+
- name: Update yarn.lock
22+
env:
23+
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
24+
run: |
25+
rm -f yarn.lock
26+
yarn install
27+
git diff
28+
- name: Create Pull Request
29+
uses: peter-evans/create-pull-request@v5
30+
with:
31+
add-paths: |
32+
yarn.lock
33+
commit-message: Update yarn.lock with latest dependencies
34+
branch: update_yarn_lock
35+
author: ManageIQ Bot <[email protected]>
36+
committer: ManageIQ Bot <[email protected]>
37+
delete-branch: true
38+
labels: dependencies
39+
assignees: jeffibm
40+
team-reviewers: ManageIQ/committers-ui
41+
push-to-fork: miq-bot/manageiq-ui-classic
42+
title: Update yarn.lock with latest dependencies
43+
body: Update yarn.lock with latest dependencies
44+
token: ${{ secrets.PR_TOKEN }}

bin/before_install

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ if [ -n "$CI" -a \( "$TEST_SUITE" = "spec:cypress" -o "$TEST_SUITE" = "spec:java
1616
echo
1717
fi
1818

19+
if [ -n "$ACT" ]; then
20+
# Install yarn
21+
curl -o- -L https://yarnpkg.com/install.sh | bash
22+
echo "$HOME/.yarn/bin" >> $GITHUB_PATH
23+
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH
24+
fi
25+
1926
gem_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)"
2027
spec_manageiq="$gem_root/spec/manageiq"
2128

0 commit comments

Comments
 (0)