Skip to content

Commit

Permalink
Merge pull request #8995 from Fryguy/gha_yarn_lock
Browse files Browse the repository at this point in the history
Add GitHub Action to update yarn.lock weekly
  • Loading branch information
DavidResende0 authored Dec 11, 2023
2 parents fad13fa + 8de76c6 commit e635eef
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/yarn_lock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update yarn.lock

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'

jobs:
update-yarn-lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up system
run: bin/before_install
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: yarn
registry-url: https://npm.manageiq.org/
- name: Update yarn.lock
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: "false"
run: |
rm -f yarn.lock
yarn install
git diff
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
yarn.lock
commit-message: Update yarn.lock with latest dependencies
branch: update_yarn_lock
author: ManageIQ Bot <[email protected]>
committer: ManageIQ Bot <[email protected]>
delete-branch: true
labels: dependencies
assignees: jeffibm
team-reviewers: ManageIQ/committers-ui
push-to-fork: miq-bot/manageiq-ui-classic
title: Update yarn.lock with latest dependencies
body: Update yarn.lock with latest dependencies
token: ${{ secrets.PR_TOKEN }}
7 changes: 7 additions & 0 deletions bin/before_install
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ if [ -n "$CI" -a \( "$TEST_SUITE" = "spec:cypress" -o "$TEST_SUITE" = "spec:java
echo
fi

if [ -n "$ACT" ]; then
# Install yarn
curl -o- -L https://yarnpkg.com/install.sh | bash
echo "$HOME/.yarn/bin" >> $GITHUB_PATH
echo "$HOME/.config/yarn/global/node_modules/.bin" >> $GITHUB_PATH
fi

gem_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)"
spec_manageiq="$gem_root/spec/manageiq"

Expand Down

0 comments on commit e635eef

Please sign in to comment.