Skip to content

Dependencies Workflow #28

Dependencies Workflow

Dependencies Workflow #28

Workflow file for this run

name: Dependencies Workflow
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * 5'
jobs:
yarn:
name: Bump Yarn
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: 'github-actions[bot]'
GIT_AUTHOR_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'
GIT_COMMITTER_NAME: 'github-actions[bot]'
GIT_COMMITTER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'
YARN_ENABLE_IMMUTABLE_INSTALLS : 'false'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
- name: Update version
run: |
old_version=$(yarn --version)
yarn set version latest
new_version=$(yarn --version)
if git diff --exit-code &> /dev/null; then
exit 0
fi
yarn
title="Bump yarn from $old_version to $new_version"
body="Bumps yarn from $old_version to $new_version"
git checkout -b "dependencies/yarn/yarn-$new_version"
git add package.json yarn.lock .yarnrc.yml .yarn/
git commit --message="$title"
git push origin HEAD
gh pr create --base=master --title="$title" --body="$body"