Expo Dependency Update #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Expo Dependency Update | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 17 * * *' | |
env: | |
NODE_VERSION: 22.12.0 | |
jobs: | |
expo-update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: yarn | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Run Expo Dependency Update | |
run: yarn expo install --fix | |
- name: Save Diffs | |
id: save-diffs | |
run: | | |
echo NUM_OF_UPDATED_DEPS=$(git diff --shortstat package.json | awk '{print $4}') >> $GITHUB_OUTPUT | |
echo -e "\`\`\`diff\n$(git diff package.json)\n\`\`\`" > package.json.diff.md | |
echo -e "\n@${{ github.repository_owner }}/frontend" >> package.json.diff.md | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: Update ${{steps.save-diffs.outputs.NUM_OF_UPDATED_DEPS}} Expo Dependencies | |
branch: chore/update-deps | |
title: '[BOT] Update Expo Dependencies' | |
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | |
labels: automated | |
# We set this pr as a draft so when it's set as "Ready for review" | |
# ci checks will run on the pr, which do not run by default for bot prs | |
draft: true | |
body-path: package.json.diff.md | |
add-paths: package.json, yarn.lock |