Skip to content

Commit

Permalink
chore: Add update-lockfiles CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Nov 25, 2024
1 parent 66c0bcd commit 9668fa0
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/update-lockfiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'Update Lockfiles (bun.lockb + Podfile.lock)'

on:
push:
branches:
- main
paths:
- ".github/workflows/update-lockfiles.yml"
pull_request:
paths:
- ".github/workflows/update-lockfiles.yml"
- "package.json"
- "**/package.json"

permissions:
contents: write

jobs:
update-lockfiles:
name: "Update lockfiles (bun.lockb + Podfile.lock)"
if: github.actor == 'dependabot[bot]'
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}

- uses: oven-sh/setup-bun@v2

- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true
working-directory: example/ios

- run: |
bun install
git add bun.lockb
cd example
bun pods
git add ios/Podfile.lock
cd ..
git config --global user.name 'dependabot[bot]'
git config --global user.email 'dependabot[bot]@users.noreply.github.com'
git commit --amend --no-edit
git push --force

0 comments on commit 9668fa0

Please sign in to comment.